Re: BUG #17959: amcheck fails to find a matching index tuple for an invisible heap tuple

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Alexander Lakhin <exclusion(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17959: amcheck fails to find a matching index tuple for an invisible heap tuple
Date: 2023-06-05 16:27:46
Message-ID: CAH2-WzngU5tZKG3XpG4jtyi_mwX75YVQn3GOWsEK3W45kAFY6g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Jun 5, 2023 at 2:00 AM Alexander Lakhin <exclusion(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alexander Lakhin 2023-06-06 03:00:00 Re: BUG #17959: amcheck fails to find a matching index tuple for an invisible heap tuple
Previous Message Peter Geoghegan 2023-06-05 16:20:54 Re: BUG #17959: amcheck fails to find a matching index tuple for an invisible heap tuple