postgresql/src/backend/access
Heikki Linnakangas ac4ab97ec0 Fix race condition in GIN posting tree page deletion.
If a page is deleted, and reused for something else, just as a search is
following a rightlink to it from its left sibling, the search would continue
scanning whatever the new contents of the page are. That could lead to
incorrect query results, or even something more curious if the page is
reused for a different kind of a page.

To fix, modify the search algorithm to lock the next page before releasing
the previous one, and refrain from deleting pages from the leftmost branch
of the tree.

Add a new Concurrency section to the README, explaining why this works.
There is a lot more one could say about concurrency in GIN, but that's for
another patch.

Backpatch to all supported versions.
2013-11-08 22:21:42 +02:00
..
common Prevent memory leaks from accumulating across printtup() calls. 2013-11-03 11:33:05 -05:00
gin Fix race condition in GIN posting tree page deletion. 2013-11-08 22:21:42 +02:00
gist Post-pgindent cleanup 2013-06-01 09:38:15 -04:00
hash Consistently use unsigned arithmetic for alignment calculations. 2013-10-20 21:04:52 -04:00
heap Fix bugs in SSI tuple locking. 2013-10-08 00:18:43 +03:00
index Use InvalidSnapshot, now SnapshotNow, as the default snapshot. 2013-07-23 10:58:32 -04:00
nbtree Use an MVCC snapshot, rather than SnapshotNow, for catalog scans. 2013-07-02 09:47:01 -04:00
rmgrdesc Use appendStringInfoString instead of appendStringInfo where possible. 2013-10-31 10:55:59 -04:00
spgist Retry after buffer locking failure during SPGiST index creation. 2013-11-02 16:45:42 -04:00
transam Use appendStringInfoString instead of appendStringInfo where possible. 2013-10-31 10:55:59 -04:00
Makefile Split out rmgr rm_desc functions into their own files 2012-11-28 13:01:15 -03:00