pgsql: nbtree VACUUM: cope with topparent inconsistencies. - Mailing list pgsql-committers

From Peter Geoghegan
Subject pgsql: nbtree VACUUM: cope with topparent inconsistencies.
Date
Msg-id E1qC8Op-002yoh-N9@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/63fa0deb31c4b18a6dbf15fc8ff64ac010ea77b2

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


pgsql-committers by date:

Previous
From: Bruce Momjian
Date:
Subject: pgsql: doc: update PG history as over "three decades"
Next
From: David Rowley
Date:
Subject: pgsql: Doc: mention that extended stats aren't used for joins