diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2013-01-17 16:35:46 +0200 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2013-01-17 16:46:16 +0200 |
commit | 9ee4d06f3fdde37b063b8a0f0fa0a2113ac12303 (patch) | |
tree | 692e6a1de1a5a48872958ab8554a57889be2c6ba /src/backend/access/gist/gistget.c | |
parent | bba486f372ffa28d6a0b70a6b0ad7065429213d0 (diff) | |
download | postgresql-9ee4d06f3fdde37b063b8a0f0fa0a2113ac12303.tar.gz postgresql-9ee4d06f3fdde37b063b8a0f0fa0a2113ac12303.zip |
Make GiST indexes on-disk compatible with 9.2 again.
The patch that turned XLogRecPtr into a uint64 inadvertently changed the
on-disk format of GiST indexes, because the NSN field in the GiST page
opaque is an XLogRecPtr. That breaks pg_upgrade. Revert the format of that
field back to the two-field struct that XLogRecPtr was before. This is the
same we did to LSNs in the page header to avoid changing on-disk format.
Bump catversion, as this invalidates any existing GiST indexes built on
9.3devel.
Diffstat (limited to 'src/backend/access/gist/gistget.c')
-rw-r--r-- | src/backend/access/gist/gistget.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c index 79996a235f0..3300fec644e 100644 --- a/src/backend/access/gist/gistget.c +++ b/src/backend/access/gist/gistget.c @@ -263,7 +263,7 @@ gistScanPage(IndexScanDesc scan, GISTSearchItem *pageItem, double *myDistances, */ if (!XLogRecPtrIsInvalid(pageItem->data.parentlsn) && (GistFollowRight(page) || - pageItem->data.parentlsn < opaque->nsn) && + pageItem->data.parentlsn < GistPageGetNSN(page)) && opaque->rightlink != InvalidBlockNumber /* sanity check */ ) { /* There was a page split, follow right link to add pages */ |