Re: BUG #17212: pg_amcheck fails on checking temporary relations - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: BUG #17212: pg_amcheck fails on checking temporary relations
Date
Msg-id CAH2-Wz=QtFGoSk=QWfvPt3g2npq0LKuehYQG6B_tncOag4DfwQ@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17212: pg_amcheck fails on checking temporary relations  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: BUG #17212: pg_amcheck fails on checking temporary relations  (Mark Dilger <mark.dilger@enterprisedb.com>)
List pgsql-hackers
On Wed, Oct 6, 2021 at 11:55 AM Peter Geoghegan <pg@bowt.ie> wrote:
> I am pretty sure that I agree with you about all these details. We
> need to tease them apart some more.

I think that what I've said boils down to this:

* pg_amcheck shouldn't attempt to verify temp relations, on the
grounds that this is fundamentally not useful, and not something that
could ever be sensibly interpreted as "just doing what the user asked
for".

* pg_amcheck calls to bt_index_check()/bt_index_parent_check() must
only be made with "i.indisready AND i.indisvalid" indexes, just like
the old query from the docs. (Actually, the same query also filters
out temp relations -- which is why I view this issue as almost
identical to the first.)

Why would the user ask for something that fundamentally doesn't make
any sense? The argument "that's just what they asked for" has it
backwards, because *not* asking for it is very difficult, while asking
for it (which, remember, fundamentally makes no sense) is very easy.

* --parent-check can and should fail in hot standby mode.

The argument "that's just what the user asked for" works perfectly here.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: storing an explicit nonce
Next
From: Stephen Frost
Date:
Subject: Re: Role Self-Administration