Re: BUG #17212: pg_amcheck fails on checking temporary relations

Mark Dilger <mark.dilger@enterprisedb.com>

From: Mark Dilger <mark.dilger@enterprisedb.com>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Alexander Lakhin <exclusion@gmail.com>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>, Robert Haas <robertmhaas@gmail.com>
Date: 2021-10-03T17:04:19Z
Lists: pgsql-bugs, pgsql-hackers

Attachments


> On Oct 2, 2021, at 10:32 AM, Peter Geoghegan <pg@bowt.ie> wrote:
> 
> On Sat, Oct 2, 2021 at 4:49 AM PG Bug reporting form
> <noreply@postgresql.org> wrote:
>> Although you can add --exclude-relation=*.pg_temp*.*, this behaviour differs
>> from the behaviour of pg_dump and friends, which skip such relations
>> silently.
> 
> I agree -- this behavior is a bug.
> 
> Can you propose a fix, Mark?

The attached patch includes a test case for this, which shows the problems against the current pg_amcheck.c, and a new version of pg_amcheck.c which fixes the bug.  Could you review it?

Thanks for bringing this to my attention.

Commits

  1. Remove unstable pg_amcheck tests.

  2. pg_amcheck: avoid unhelpful verification attempts.

  3. amcheck: Skip unlogged relations in Hot Standby.

  4. amcheck: Skip unlogged relations during recovery.