Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 877b67c

Browse files
committed
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.
1 parent ed0b409 commit 877b67c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/access/gin/ginxlog.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,8 @@ ginRedoUpdateMetapage(XLogRecPtr lsn, XLogRecord *record)
528528
elog(ERROR, "failed to add item to index page");
529529

530530
tuples = (IndexTuple) (((char *) tuples) + tupsize);
531+
532+
off++;
531533
}
532534

533535
/*

0 commit comments

Comments
 (0)