Re: BUG: Postgres 14 + vacuum_defer_cleanup_age + FOR UPDATE + UPDATE
Peter Eisentraut <peter.eisentraut@enterprisedb.com>
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Andres Freund <andres@anarazel.de>
Cc: Mark Dilger <mark.dilger@enterprisedb.com>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2023-05-12T08:28:00Z
Lists: pgsql-hackers
On 10.05.23 20:04, Andres Freund wrote:
>> This commit adds a test
>>
>> is(scalar @lp_off, $ROWCOUNT, "acquired row offsets");
>>
>> *before* that skip_all call. This appears to be invalid. If the skip_all
>> happens, you get a complaint like
>>
>> t/004_verify_heapam.pl (Wstat: 0 Tests: 1 Failed: 0)
>> Parse errors: Bad plan. You planned 0 tests but ran 1.
>>
>> We could move the is() test after all the skip_all's. Any thoughts?
>
> I think the easiest fix is to just die if we can't get the offsets - it's not
> like we can really continue afterwards...
This should do it:
-is(scalar @lp_off, $ROWCOUNT, "acquired row offsets");
+scalar @lp_off == $ROWCOUNT or BAIL_OUT("row offset counts mismatch");
But I'm not sure what the latest thinking on BAIL_OUT is. It is used
nearby in a similar way though.
Commits
-
Fix incorrect TAP test ordering
- 92155e15d3cf 16.0 landed
-
pg_amcheck: Minor test speedups
- a4f23f9b3cdd 16.0 landed
-
amcheck: Fix FullTransactionIdFromXidAndCtx() for xids before epoch 0
- b3a83055c235 14.8 landed
- e8a9750d03d7 15.3 landed
- 4f5d461e048b 16.0 landed
-
amcheck: Fix ordering bug in update_cached_xid_range()
- a42f515d6b45 14.8 landed
- 6d9588108a56 15.3 landed
- 16327240da29 16.0 landed
-
Fix corruption due to vacuum_defer_cleanup_age underflowing 64bit xids
- be504a3e974d 16.0 landed
- 3c92f7e9d851 12.15 landed
- e6d77f22c7a8 13.11 landed
- 324281fd5b1b 14.8 landed
- 391f08fd6804 15.3 landed
-
Add hardening to catch invalid TIDs in indexes.
- e7428a99a13f 15.0 cited
-
Use full 64-bit XID for checking if a deleted GiST page is old enough.
- 6655a7299d83 13.0 cited
-
Avoid early reuse of btree pages, causing incorrect query results.
- d3abbbebe52e 9.2.0 cited