aboutsummaryrefslogtreecommitdiff
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:56 +0300
commit02b9fd73ee576260355a2e2bd489f93dbcbdb37f (patch)
tree720d16a09b0845df6f93e4c6c6f332af7c853269
parent74cf8028411700474b5464d62dafdc32d48583aa (diff)
downloadpostgresql-02b9fd73ee576260355a2e2bd489f93dbcbdb37f.tar.gz
postgresql-02b9fd73ee576260355a2e2bd489f93dbcbdb37f.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.
-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 8cdd78c83aa..c5774225806 100644
--- a/src/backend/access/gist/gistxlog.c
+++ b/src/backend/access/gist/gistxlog.c
@@ -183,7 +183,6 @@ gistRedoPageUpdateRecord(XLogRecPtr lsn, XLogRecord *record)
GistPageSetLeaf(page);
}
- GistPageGetOpaque(page)->rightlink = InvalidBlockNumber;
PageSetLSN(page, lsn);
PageSetTLI(page, ThisTimeLineID);
MarkBufferDirty(buffer);