On Mon, Jun 5, 2023 at 2:00 AM Alexander Lakhin <exclusion@gmail.com> wrote:
> A complete TAP test to reproduce the issue is attached.
> I put it in src/bin/pg_amcheck/t/, run (on master, e6a254c0d)
> PROVE_TESTS=t/099_pdri_error.pl make -s check -C src/bin/pg_amcheck/
> and get:
>
> # Failed test 'pg_amcheck after manipulations stdout /(?^:^$)/'
> # at t/099_pdri_error.pl line 60.
> # 'btree index "regress001.pg_catalog.pg_depend_reference_index":
> # ERROR: heap tuple (13,35) from table "pg_depend" lacks matching index tuple within index
"pg_depend_reference_index"
> # '
> # doesn't match '(?^:^$)'
I can easily reproduce this result using your test case.
I notice that the test case will pass if I remove your use of the
"--rootdescend" option from your tap test script. This suggests that
the problem is somehow limited to heapallindexed verification when run
through the bt_index_parent_check() interface -- bt_index_check()
heapallindexed verification seems unaffected. The former works rather
like a CREATE INDEX internally (and so can just use SnapshotAny),
while the latter works more like CREATE INDEX CONCURRENTLY (and so
must use an MVCC snapshot).
--
Peter Geoghegan