pgsql: Use full 64-bit XID for checking if a deleted GiST page is olde - Mailing list pgsql-committers

From Heikki Linnakangas
Subject pgsql: Use full 64-bit XID for checking if a deleted GiST page is olde
Date
Msg-id E1hqL31-00010o-Rm@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Use full 64-bit XID for checking if a deleted GiST page is old enough.

Otherwise, after a deleted page gets even older, it becomes unrecyclable
again. B-tree has the same problem, and has had since time immemorial,
but let's at least fix this in GiST, where this is new.

Backpatch to v12, where GiST page deletion was introduced.

Reviewed-by: Andrey Borodin
Discussion: https://www.postgresql.org/message-id/835A15A5-F1B4-4446-A711-BF48357EB602%40yandex-team.ru

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6655a7299d835dea9e8e0ba69cc5284611b96f29

Modified Files
--------------
src/backend/access/gist/gistutil.c     | 24 +++++++++++++++---
src/backend/access/gist/gistvacuum.c   |  7 +++---
src/backend/access/gist/gistxlog.c     | 32 ++++++++++++++++++------
src/backend/access/rmgrdesc/gistdesc.c | 11 ++++++---
src/backend/utils/time/snapmgr.c       | 30 +++++++++++++++++++++++
src/include/access/gist.h              | 45 ++++++++++++++++++++++++++++++----
src/include/access/gist_private.h      |  4 +--
src/include/access/gistxlog.h          |  6 ++---
src/include/utils/snapmgr.h            |  3 +++
9 files changed, 134 insertions(+), 28 deletions(-)


pgsql-committers by date:

Previous
From: Andrew Dunstan
Date:
Subject: pgsql: Don't assume expr is available in pgbench tests
Next
From: Andrew Dunstan
Date:
Subject: Re: pgsql: Improve stability of TAP test for synchronous replication