postgresql/src/backend/access
Heikki Linnakangas 1d27dcf578 Fix bug in gistRelocateBuildBuffersOnSplit().
When we create a temporary copy of the old node buffer, in stack, we mustn't
leak that into any of the long-lived data structures. Before this patch,
when we called gistPopItupFromNodeBuffer(), it got added to the array of
"loaded buffers". After gistRelocateBuildBuffersOnSplit() exits, the
pointer added to the loaded buffers array points to garbage. Often that goes
unnotied, because when we go through the array of loaded buffers to unload
them, buffers with a NULL pageBuffer are ignored, which can often happen by
accident even if the pointer points to garbage.

This patch fixes that by marking the temporary copy in stack explicitly as
temporary, and refrain from adding buffers marked as temporary to the array
of loaded buffers.

While we're at it, initialize nodeBuffer->pageBlocknum to InvalidBlockNumber
and improve comments a bit. This isn't strictly necessary, but makes
debugging easier.
2012-05-18 19:38:32 +03:00
..
common Another trivial comment-typo fix. 2012-04-25 14:28:58 -04:00
gin Lots of doc corrections. 2012-04-23 22:43:09 -04:00
gist Fix bug in gistRelocateBuildBuffersOnSplit(). 2012-05-18 19:38:32 +03:00
hash Clean up compiler warnings from unused variables with asserts disabled 2012-03-21 23:33:10 +02:00
heap Fix bug in freespace calculation in heap_multi_insert(). 2012-05-16 14:13:06 +03:00
index Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
nbtree Lots of doc corrections. 2012-04-23 22:43:09 -04:00
spgist Remove duplicate words in comments. 2012-05-02 10:20:27 +03:00
transam Update comments that became out-of-date with the PGXACT struct. 2012-05-14 10:28:55 +03:00
Makefile Add SP-GiST (space-partitioned GiST) index access method. 2011-12-17 16:42:30 -05:00