pgsql: Use full 64-bit XID for checking if a deleted GiST page is old e

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use full 64-bit XID for checking if a deleted GiST page is old e
Date: 2019-07-24 17:27:27
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/fb5344c969af77bb78bc2a643fb75b9f8fea72dd

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2019-07-24 18:17:14 Re: pgsql: Improve stability of TAP test for synchronous replication
Previous Message Andrew Dunstan 2019-07-24 15:49:16 pgsql: Don't assume expr is available in pgbench tests