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: amcheck: Skip unlogged relations during recovery.
Date: Mon, 12 Aug 2019 22:21:47 +0000
Message-ID: <E1hxIhH-0006XB-UH@gemulon.postgresql.org> (raw)

amcheck: Skip unlogged relations during recovery.

contrib/amcheck failed to consider the possibility that unlogged
relations will not have any main relation fork files when running in hot
standby mode.  This led to low-level "can't happen" errors that complain
about the absence of a relfilenode file.

To fix, simply skip verification of unlogged index relations during
recovery.  In passing, add a direct check for the presence of a main
fork just before verification proper begins, so that we cleanly verify
the presence of the main relation fork file.

Author: Andrey Borodin, Peter Geoghegan
Reported-By: Andrey Borodin
Diagnosed-By: Andrey Borodin
Discussion: https://postgr.es/m/DA9B33AC-53CB-4643-96D4-7A0BBC037FA1@yandex-team.ru
Backpatch: 10-, where amcheck was introduced.

Branch
------
REL_12_STABLE

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

Modified Files
--------------
contrib/amcheck/verify_nbtree.c | 45 ++++++++++++++++++++++++++++++++++++-----
1 file changed, 40 insertions(+), 5 deletions(-)



view thread (4+ messages)

Message-ID: <E1hxIhH-0006XB-UH@gemulon.postgresql.org>
Permalink:  ../E1hxIhH-0006XB-UH@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hxIhH-0006XB-UH@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: pg@bowt.ie
  Subject: Re: pgsql: amcheck: Skip unlogged relations during recovery.
  In-Reply-To: <E1hxIhH-0006XB-UH@gemulon.postgresql.org>
  References: <E1hxIhH-0006XB-UH@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