aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistxlog.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-04-08 14:47:24 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2014-04-08 14:51:49 +0300
commit601c01e08ded65225c0a94878a9e5b6d90cd1206 (patch)
tree698a87d2201ff472d0ae8c98ebab78b01ec36f77 /src/backend/access/gist/gistxlog.c
parente118822e72486aec32bbbecd3cf7543dbb756c58 (diff)
downloadpostgresql-601c01e08ded65225c0a94878a9e5b6d90cd1206.tar.gz
postgresql-601c01e08ded65225c0a94878a9e5b6d90cd1206.zip
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.
Diffstat (limited to 'src/backend/access/gist/gistxlog.c')
-rw-r--r--src/backend/access/gist/gistxlog.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/backend/access/gist/gistxlog.c b/src/backend/access/gist/gistxlog.c
index 9dfb57e054b..15b7eb024ae 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);