pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix amcheck for page checks concurrent to replay of btree page d
Date: Thu, 14 May 2020 09:55:40 +0000
Message-ID: <E1jZAaa-00027R-Iz@gemulon.postgresql.org> (raw)

Fix amcheck for page checks concurrent to replay of btree page deletion

amcheck expects at least hikey to always exist on leaf page even if it is
deleted page.  But replica reinitializes page during replay of page deletion,
causing deleted page to have no items.  Thus, replay of page deletion can
cause an error in concurrent amcheck run.

This commit relaxes amcheck expectation making it tolerate deleted page with
no items.

Reported-by: Konstantin Knizhnik
Discussion: https://postgr.es/m/CAPpHfdt_OTyQpXaPJcWzV2N-LNeNJseNB-K_A66qG%3DL518VTFw%40mail.gmail.com
Author: Alexander Korotkov
Reviewed-by: Peter Geoghegan
Backpatch-through: 11

Branch
------
REL_12_STABLE

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

Modified Files
--------------
contrib/amcheck/verify_nbtree.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)



view thread (3+ messages)  latest in thread

Message-ID: <E1jZAaa-00027R-Iz@gemulon.postgresql.org>
Permalink:  ../E1jZAaa-00027R-Iz@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jZAaa-00027R-Iz@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: akorotkov@postgresql.org
  Subject: Re: pgsql: Fix amcheck for page checks concurrent to replay of btree page d
  In-Reply-To: <E1jZAaa-00027R-Iz@gemulon.postgresql.org>
  References: <E1jZAaa-00027R-Iz@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