mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
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.
This commit is contained in:
@ -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 */
|
||||
|
Reference in New Issue
Block a user