pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Dilger <mark.dilger@enterprisedb.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Alexander Lakhin <exclusion@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Robert Haas <robertmhaas@gmail.com>
Subject: Re: BUG #17212: pg_amcheck fails on checking temporary relations
Date: Mon, 4 Oct 2021 20:19:02 -0700
Message-ID: <CACF59A6-865B-4D42-B8E4-39CD64F8CEA4@enterprisedb.com> (raw)
In-Reply-To: <CAH2-Wzk=vLs8qapiK155uwmzWn6dcK2=3XRE=988V02mmkxJVg@mail.gmail.com>
References: <17212-34dd4a1d6bba98bf@postgresql.org>
	<CAH2-Wz=bw-Uk2yoOq7yevC9hyMGgZ2Ud34nd9YJJPXJ3pkVcrw@mail.gmail.com>
	<E85855BD-C063-4B24-9EAA-02DECC8F42B9@enterprisedb.com>
	<E283B45F-5745-49C9-BBC7-99876E2FABD1@enterprisedb.com>
	<f42de8ec-f219-0922-93b3-37a72bba1feb@gmail.com>
	<28B36E41-1E8F-4DC1-A924-711621BA4972@enterprisedb.com>
	<CAH2-Wz=v4py=c79J7wpdVmQMkd8rO7gj5Ur5Dp4E0y7aQUz6cg@mail.gmail.com>
	<386F66EE-DEFD-42EA-9DB2-102BF3414669@enterprisedb.com>
	<CAH2-Wzkwb+1GSONMrXByHhgkzD-N59A_kFcvsoA_+M9cNNHm5g@mail.gmail.com>
	<71339EFC-3060-4775-B9C6-D39E02752A2F@enterprisedb.com>
	<CAH2-Wz=eqzOwSnwW5eT1AUUUuAhLcojqL+CQaaKs5T6+YR4Rsw@mail.gmail.com>
	<81019B2A-C0EB-4890-BA3A-DB60590AAF43@enterprisedb.com>
	<CAH2-Wzk=vLs8qapiK155uwmzWn6dcK2=3XRE=988V02mmkxJVg@mail.gmail.com>



> On Oct 4, 2021, at 6:19 PM, Peter Geoghegan <pg@bowt.ie> wrote:
> 
> I don't see what the point of this example is.

It doesn't matter.

I am changing pg_amcheck to filter out indexes as you say.  Since the btree check should no longer error in these cases, the issue of pg_amcheck exit(2) sorts itself out without further code changes.

I am changing verify_heapam to skip unlogged tables during recovery.  In testing, checking such a table results in a simple notice:

  NOTICE:  cannot verify unlogged relation "u_tbl" during recovery, skipping

While testing, I also created an index on the unlogged table and checked that index using bt_index_parent_check, and was surprised that checking it using bt_index_parent_check raises an error:

  ERROR:  cannot acquire lock mode ShareLock on database objects while recovery is in progress
  HINT:  Only RowExclusiveLock or less can be acquired on database objects during recovery.

It doesn't get as far as btree_index_mainfork_expected().  So I am changing pg_amcheck to filter out indexes when pg_is_in_recovery() is true and relpersistence='u'.  Does that sound right to you?

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company








view thread (83+ messages)  latest in thread

Message-ID: <CACF59A6-865B-4D42-B8E4-39CD64F8CEA4@enterprisedb.com>
Permalink:  ../CACF59A6-865B-4D42-B8E4-39CD64F8CEA4@enterprisedb.com/
Also on:    postgresql.org/message-id/CACF59A6-865B-4D42-B8E4-39CD64F8CEA4@enterprisedb.com

 · 

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-bugs@postgresql.org
  Cc: mark.dilger@enterprisedb.com, pg@bowt.ie, exclusion@gmail.com, pgsql-hackers@postgresql.org, robertmhaas@gmail.com
  Subject: Re: BUG #17212: pg_amcheck fails on checking temporary relations
  In-Reply-To: <CACF59A6-865B-4D42-B8E4-39CD64F8CEA4@enterprisedb.com>

* 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