From 601c01e08ded65225c0a94878a9e5b6d90cd1206 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Tue, 8 Apr 2014 14:47:24 +0300 Subject: [PATCH] Fix hot standby bug with GiST scans. 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 | 1 - 1 file changed, 1 deletion(-) diff --git a/src/backend/access/gist/gistxlog.c b/src/backend/access/gist/gistxlog.c index 9dfb57e054..15b7eb024a 100644 --- a/src/backend/access/gist/gistxlog.c +++ b/src/backend/access/gist/gistxlog.c @@ -182,7 +182,6 @@ gistRedoPageUpdateRecord(XLogRecPtr lsn, XLogRecord *record) GistPageSetLeaf(page); } - GistPageGetOpaque(page)->rightlink = InvalidBlockNumber; PageSetLSN(page, lsn); MarkBufferDirty(buffer); UnlockReleaseBuffer(buffer); -- 2.40.0