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/gistvacuum.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/gistvacuum.c')
-rw-r--r-- | src/backend/access/gist/gistvacuum.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/gist/gistvacuum.c b/src/backend/access/gist/gistvacuum.c index dcad36ea3ec..b5be6765d4e 100644 --- a/src/backend/access/gist/gistvacuum.c +++ b/src/backend/access/gist/gistvacuum.c @@ -114,7 +114,7 @@ pushStackIfSplited(Page page, GistBDItem *stack) GISTPageOpaque opaque = GistPageGetOpaque(page); if (stack->blkno != GIST_ROOT_BLKNO && !XLogRecPtrIsInvalid(stack->parentlsn) && - (GistFollowRight(page) || stack->parentlsn < opaque->nsn) && + (GistFollowRight(page) || stack->parentlsn < GistPageGetNSN(page)) && opaque->rightlink != InvalidBlockNumber /* sanity check */ ) { /* split page detected, install right link to the stack */ |