pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Store the deletion horizon XID for a deleted GIN page on the rig
Date: Sun, 09 Feb 2020 17:03:12 +0000
Message-ID: <E1j0pzE-0001O2-2O@gemulon.postgresql.org> (raw)

Store the deletion horizon XID for a deleted GIN page on the right page.

Commit b10714080 moved the GinPageSetDeleteXid() call to a spot where
the "page" variable was pointing to the wrong page, causing the XID
to be inserted on a page that's not being deleted, thus allowing later
GinPageIsRecyclable tests to recycle the deleted page too soon.

It might be a good idea to stop using the single "page" variable for
multiple purposes in this function.  But for the moment I just moved
the GinPageSetDeleteXid() call down beside the GinPageSetDeleted()
call, which seems like a more logical place for it anyway.

Back-patch to v11, as the faulty patch was.  (Fortunately, the bug
hasn't made it into any release yet.)

Discussion: https://postgr.es/m/21620.1581098806@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4093ff573702e9f157507340593680dc2c75e88e

Modified Files
--------------
src/backend/access/gin/ginvacuum.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)



view thread (3+ messages)  latest in thread

Message-ID: <E1j0pzE-0001O2-2O@gemulon.postgresql.org>
Permalink:  ../E1j0pzE-0001O2-2O@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1j0pzE-0001O2-2O@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: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Store the deletion horizon XID for a deleted GIN page on the rig
  In-Reply-To: <E1j0pzE-0001O2-2O@gemulon.postgresql.org>
  References: <E1j0pzE-0001O2-2O@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