]> granicus.if.org Git - postgresql/commit
Fix erroneous replay of GIN_UPDATE_META_PAGE WAL records.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 25 Nov 2011 18:58:59 +0000 (13:58 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 25 Nov 2011 18:59:34 +0000 (13:59 -0500)
commit9b60e40cad723cf904ebd5d4afa5ecd40431534a
tree87657b760cd9dab7486c4dfb0ecfe8f795b2d3b6
parentaf7b787aad063b112f72691213fa05ccda489a63
Fix erroneous replay of GIN_UPDATE_META_PAGE WAL records.

A simple thinko in ginRedoUpdateMetapage, namely failing to increment a
loop counter, led to inserting records into the last pending-list page in
the wrong order (the opposite of that intended).  So far as I can tell,
this would not upset the code that eventually flushes pending items into
the main part of the GIN index.  But it did break the code that searched
the pending list for matches, resulting in transient failure to find
matching entries during index lookups, as illustrated in bug #6307 from
Maksym Boguk.

Back-patch to 8.4 where the incorrect code was introduced.
src/backend/access/gin/ginxlog.c