pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Geoghegan <pg@bowt.ie>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: nbtree VACUUM: cope with topparent inconsistencies.
Date: Thu, 22 Jun 2023 00:42:12 +0000
Message-ID: <E1qC8Op-002yoq-Oc@gemulon.postgresql.org> (raw)

nbtree VACUUM: cope with topparent inconsistencies.

Avoid "right sibling %u of block %u is not next child" errors when
vacuuming a corrupt nbtree index.  Just LOG the issue and press on.
That way VACUUM will have a decent chance of finishing off all required
processing for the index (and for the table as a whole).

This is similar to recent work from commit 5abff197, as well as work
from commit 5b861baa (later backpatched as commit 43e409ce), which
taught nbtree VACUUM to keep going when its "re-find" check fails.  The
hardening added by this commit takes place directly after the "re-find"
check, right before the critical section for the first stage of page
deletion.

Author: Peter Geoghegan <pg@bowt.ie>
Discussion: https://postgr.es/m/CAH2-Wz=dayg0vjs4+er84TS9ami=csdzjpuiCGbEw=idhwqhzQ@mail.gmail.com
Backpatch: 11- (all supported versions).

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7ddba19eb7114fd34f54986d83a1ad50b1db9537

Modified Files
--------------
src/backend/access/nbtree/nbtpage.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1qC8Op-002yoq-Oc@gemulon.postgresql.org>
Permalink:  ../E1qC8Op-002yoq-Oc@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qC8Op-002yoq-Oc@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: pg@bowt.ie, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: nbtree VACUUM: cope with topparent inconsistencies.
  In-Reply-To: <E1qC8Op-002yoq-Oc@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