Failing test_aio tests due to too low(illegal?) segsize_blocks

From: Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Andres Freund <andres(at)anarazel(dot)de>
Subject: Failing test_aio tests due to too low(illegal?) segsize_blocks
Date: 2026-04-08 06:51:30
Message-ID: CAKZiRmz=YYQU5Gzq-bVjiwMfmVmxrewWaJVducSO3g4iWvBkFg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

For some reason I've ended up using -Dsegsize_blocks=4 and I've started
getting ninja test errors after getting back from vacation leave like
below (so this test was included only since then):

stderr:
# Failed test 'worker: normal: test reading of invalid block 2,3 in
larger read: expected stderr'
# at /git/postgres/src/test/modules/test_aio/t/001_aio.pl line 989.
# 'psql:<stdin>:55: ERROR: read crossing segment boundary'
# doesn't match '(?^:^psql:<stdin>:\d+: ERROR: 2 invalid pages
among blocks 1..4 of relation "base/.*/.*\nDETAIL: Block 2 held the
first invalid page\.\nHINT:[^\n]+$)'
# Failed test 'worker: normal: test zeroing of invalid block 2,3 in
larger read, ZERO_ON_ERROR: expected stderr'
# at /git/postgres/src/test/modules/test_aio/t/001_aio.pl line 999.
# 'psql:<stdin>:59: ERROR: read crossing segment boundary'
# doesn't match '(?^:^psql:<stdin>:\d+: WARNING: zeroing out 2
invalid pages among blocks 1..4 of relation "base/.*/.*\nDETAIL:
Block 2 held the first zeroed page\.\nHINT:[^\n]+$)'
# Failed test 'worker: normal: test zeroing of invalid block 2,3 in
larger read, zero_damaged_pages: expected stderr'
# at /git/postgres/src/test/modules/test_aio/t/001_aio.pl line 1009.
# 'psql:<stdin>:66: ERROR: read crossing segment boundary'
[..]
# at /git/postgres/src/test/modules/test_aio/t/001_aio.pl line 1353.
# 'psql:<stdin>:62: ERROR: read crossing segment boundary'
# doesn't match '(?^:^psql:<stdin>:\d+: ERROR: invalid page in
block 4 of relation "base/\d+/\d+"$)'
# Failed test 'worker: test reading of valid block 1, checksum
failed 2, 3, invalid 3-5, zero=true: expected stderr'
# at /git/postgres/src/test/modules/test_aio/t/001_aio.pl line 1375.
# 'psql:<stdin>:77: ERROR: read crossing segment boundary'
[..]

with segsize_blocks=5 I've got:

# Failed test 'worker: temp rel: test reading of invalid block 4,
valid block 5: expected stderr'
# at /git/postgres/src/test/modules/test_aio/t/001_aio.pl line 1158.
# 'psql:<stdin>:66: ERROR: read crossing segment boundary'
# doesn't match '(?^:^psql:<stdin>:\d+: ERROR: invalid page in
block 4 of relation "base/\d+/t\d+_\d+"$)'
# Failed test 'worker: test reading of valid block 1, checksum
failed 2, 3, invalid 3-5, zero=true: expected stderr'
# at /git/postgres/src/test/modules/test_aio/t/001_aio.pl line 1375.
# 'psql:<stdin>:77: ERROR: read crossing segment boundary'
# doesn't match '(?^:^psql:<stdin>:\d+: WARNING: zeroing 3
page\(s\) and ignoring 2 checksum failure\(s\) among blocks 1..5 of
relation ")'
# die: death by signal at
/git/postgres/src/test/perl/PostgreSQL/Test/Cluster.pm line 181.

.cirrus file show usage of segsize_blocks=6, and also 8 works fine without
errors, so it's just nuisance on my side, but it took some minutes for me
to realize this and I'll just ask maybe we should just block usage of
RELSEG_SIZE < 6 blocks in meson/configure? (patch attached)

-J.

Attachment Content-Type Size
v1-0001-Limit-minimum-allowed-segsize-blocks-in-autoconf-.patch text/x-patch 1.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2026-04-08 06:54:10 Re: Use SIGTERM instead of SIGUSR1 for slotsync worker to exit during promotion?
Previous Message Lakshmi N 2026-04-08 06:38:39 DOCS: Update data_checksums documentation to reflect enum change