]> granicus.if.org Git - postgresql/commitdiff
Fix hot standby bug with GiST scans.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 8 Apr 2014 11:47:24 +0000 (14:47 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 8 Apr 2014 11:52:01 +0000 (14:52 +0300)
Don't reset the rightlink of a page when replaying a page update record.
This was a leftover from pre-hot standby days, when it was not possible to
have scans concurrent with WAL replay. Resetting the right-link was not
necessary back then either, but it was done for the sake of tidiness. But
with hot standby, it's wrong, because a concurrent scan might still need it.

Backpatch all versions with hot standby, 9.0 and above.

src/backend/access/gist/gistxlog.c

index d0ca2ffa4391e681e7ca7208130a8dd3a0777cfe..73e3743c79f202387616ca426ee242e35f9d565d 100644 (file)
@@ -186,7 +186,6 @@ gistRedoPageUpdateRecord(XLogRecPtr lsn, XLogRecord *record)
                GistPageSetLeaf(page);
        }
 
-       GistPageGetOpaque(page)->rightlink = InvalidBlockNumber;
        PageSetLSN(page, lsn);
        PageSetTLI(page, ThisTimeLineID);
        MarkBufferDirty(buffer);