mirror of
https://github.com/postgres/postgres.git
synced 2025-06-19 04:21:08 +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:
@ -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 */
|
||||
|
Reference in New Issue
Block a user