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

From: Alexander Lakhin <exclusion(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)bowt(dot)ie>, Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BUG #17212: pg_amcheck fails on checking temporary relations
Date: 2021-10-06 06:00:00
Message-ID: c422a1aa-81c0-0762-0971-9a026cf2aa79@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Hello Mark, Peter, Robert,
05.10.2021 20:22, Peter Geoghegan пишет:
> On Tue, Oct 5, 2021 at 10:03 AM Mark Dilger
> <mark(dot)dilger(at)enterprisedb(dot)com> wrote:
>> I took no offense. Actually, I owe you a thank-you for having put so much effort into debating the behavior with me. I think the patch to fix bug #17212 will be better for it.
> Glad that you think so. And, thanks for working on the issue so promptly.
>
> This was a question of fundamental definitions. Those are often very tricky.
Thanks for the discussion and fixing the issues! (I haven't found the
latest fix in the thread yet, but I agree with the approach.)

I think that ideally pg_amcheck should not fail on a live database, that
does not contain corrupted data, and should not affect the database
usage by other users (as it's "only a check").
So for example, pg_amcheck should run successfully in parallel with
`make installcheck` and should not cause any of the tests fail. (There
could be nuances with, say, volatile functions called by the index
expressions, but in general it could be possible.)
I tried to run the following script:
(for i in `seq 100`; do echo "=== iteration $i ===" >>pg_amcheck.log;
pg_amcheck -a --install-missing --heapallindexed --rootdescend
--progress >>pg_amcheck.log 2>&1 || echo "FAIL" >>pg_amcheck.log; done) &
make installcheck

And got several deadlocks again (manifested by some tests failing) and
also "ERROR:  could not open relation with OID xxxx" - that could be
considered as a transition state (it is possible without locking), that
cause pg_amcheck to report an overall error.

Best regards,
Alexander

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Geoghegan 2021-10-06 06:21:00 Re: BUG #17212: pg_amcheck fails on checking temporary relations
Previous Message James Robinson 2021-10-06 04:36:03 Re: BUG #17215: ltree tests failing in REL_14_STABLE / commit cb8a5a588

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2021-10-06 06:09:41 Re: Incorrect snapshots while promoting hot standby node when 2PC is used
Previous Message Andres Freund 2021-10-06 05:57:02 Running tests under valgrind is getting slower at an alarming pace