pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use full 64-bit XID for checking if a deleted GiST page is old e
Date: Wed, 24 Jul 2019 17:27:27 +0000
Message-ID: <E1hqL31-00010r-Ru@gemulon.postgresql.org> (raw)

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



view thread (2+ messages)

Message-ID: <E1hqL31-00010r-Ru@gemulon.postgresql.org>
Permalink:  ../E1hqL31-00010r-Ru@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hqL31-00010r-Ru@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: heikki.linnakangas@iki.fi
  Subject: Re: pgsql: Use full 64-bit XID for checking if a deleted GiST page is old e
  In-Reply-To: <E1hqL31-00010r-Ru@gemulon.postgresql.org>
  References: <E1hqL31-00010r-Ru@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox