Re: Unstable regression test for contrib/pageinspect

From: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Unstable regression test for contrib/pageinspect
Date: 2022-11-21 03:21:20
Message-ID: 970ED201-9D3F-44AC-BCB1-77B83598CC7A@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Nov 20, 2022, at 12:37 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> contrib/amcheck and contrib/pg_visibility are also using
> DISABLE_PAGE_SKIPPING, so I wonder if they have similar hazards.
> I haven't seen them fall over, though.

In the amcheck regression test case, it's because the test isn't sensitive to whether the freeze actually happens. You can comment out that line, and the only test difference is the comment:

@@ -108,8 +108,8 @@
ERROR: ending block number must be between 0 and 0
SELECT * FROM verify_heapam(relation := 'heaptest', startblock := 10000, endblock := 11000);
ERROR: starting block number must be between 0 and 0
--- Vacuum freeze to change the xids encountered in subsequent tests
-VACUUM (FREEZE, DISABLE_PAGE_SKIPPING) heaptest;
+-- -- Vacuum freeze to change the xids encountered in subsequent tests
+-- VACUUM (FREEZE, DISABLE_PAGE_SKIPPING) heaptest;
-- Check that valid options are not rejected nor corruption reported
-- for a non-empty frozen table
SELECT * FROM verify_heapam(relation := 'heaptest', skip := 'none');

The amcheck TAP test is sensitive to commenting out the freeze, though:

t/001_verify_heapam.pl .. 42/?
# Failed test 'all-frozen corrupted table skipping all-frozen'
# at t/001_verify_heapam.pl line 58.
# got: '0|3||line pointer redirection to item at offset 21840 exceeds maximum offset 38
# 0|4||line pointer to page offset 21840 with length 21840 ends beyond maximum page offset 8192
# 0|5||line pointer redirection to item at offset 0 precedes minimum offset 1
# 0|6||line pointer length 0 is less than the minimum tuple header size 24
# 0|7||line pointer to page offset 15 is not maximally aligned
# 0|8||line pointer length 15 is less than the minimum tuple header size 24'
# expected: ''
t/001_verify_heapam.pl .. 211/? # Looks like you failed 1 test of 272.
t/001_verify_heapam.pl .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/272 subtests
t/002_cic.pl ............ ok
t/003_cic_2pc.pl ........ ok

Test Summary Report
-------------------
t/001_verify_heapam.pl (Wstat: 256 (exited 1) Tests: 272 Failed: 1)
Failed test: 80
Non-zero exit status: 1
Files=3, Tests=280, 10 wallclock secs ( 0.05 usr 0.02 sys + 3.84 cusr 3.10 csys = 7.01 CPU)
Result: FAIL
make: *** [check] Error 1

But the TAP test also disables autovacuum, so a background auto-analyze shouldn't be running. Maybe that's why you haven't seen amcheck fall over?


Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-11-21 04:32:15 Re: Unstable regression test for contrib/pageinspect
Previous Message Justin Pryzby 2022-11-21 03:00:11 Re: CREATE INDEX CONCURRENTLY on partitioned index