Skip to content
Snippets Groups Projects
Commit 7ca32e25 authored by Heikki Linnakangas's avatar Heikki Linnakangas
Browse files

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.
parent 38a2b95c
No related branches found
No related tags found
No related merge requests found
...@@ -182,7 +182,6 @@ gistRedoPageUpdateRecord(XLogRecPtr lsn, XLogRecord *record) ...@@ -182,7 +182,6 @@ gistRedoPageUpdateRecord(XLogRecPtr lsn, XLogRecord *record)
GistPageSetLeaf(page); GistPageSetLeaf(page);
} }
GistPageGetOpaque(page)->rightlink = InvalidBlockNumber;
PageSetLSN(page, lsn); PageSetLSN(page, lsn);
MarkBufferDirty(buffer); MarkBufferDirty(buffer);
UnlockReleaseBuffer(buffer); UnlockReleaseBuffer(buffer);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment