Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitce6d793

Browse files
committed
On sparc64+ext4, suppress test failures from known WAL read failure.
Buildfarm members kittiwake, tadarida and snapper began to failfrequently when commits3cd9c3b andf47ed79 added tests of concurrency, butthe problem was reachable before those commits. Back-patch to v10 (allsupported versions).Discussion:https://postgr.es/m/20220116210241.GC756210@rfd.leadboat.com
1 parent2dbb7b9 commitce6d793

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

‎contrib/amcheck/t/003_cic_2pc.pl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
use Test::Moretests=> 5;
1313

14+
local$TODO ='filesystem bug'if PostgreSQL::Test::Utils::has_wal_read_bug;
15+
1416
my ($node,$result);
1517

1618
#

‎src/test/perl/PostgreSQL/Test/Utils.pm

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,29 @@ sub perl2host
351351

352352
=pod
353353
354+
=itemhas_wal_read_bug()
355+
356+
Returns true if $tmp_check is subject to a sparc64+ext4 bug that causes WAL
357+
readers to see zeros if another process simultaneously wrote the same offsets.
358+
Consult this in tests that fail frequently on affected configurations. The
359+
bug has made streaming standbys fail to advance, reporting corrupt WAL. It
360+
has made COMMIT PREPARED fail with "could not read two-phase state from WAL".
361+
Non-WAL PostgreSQL reads haven't been affected, likely because those readers
362+
and writers have buffering systems in common. See
363+
https://postgr.es/m/20220116210241.GC756210@rfd.leadboat.com for details.
364+
365+
=cut
366+
367+
subhas_wal_read_bug
368+
{
369+
return
370+
$Config{osname}eq'linux'
371+
&&$Config{archname} =~/^sparc/
372+
&& !run_log([qw(df -x ext4),$tmp_check ],'>','/dev/null','2>&1');
373+
}
374+
375+
=pod
376+
354377
=itemsystem_log(@cmd)
355378
356379
Run (viaC<system()>) the command passed as argument; the return

‎src/test/recovery/t/027_stream_regress.pl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,20 @@
33
use warnings;
44
use PostgreSQL::Test::Cluster;
55
use PostgreSQL::Test::Utils;
6-
use Test::Moretests=> 4;
6+
use Test::More;
77
use File::Basename;
88

9+
if (PostgreSQL::Test::Utils::has_wal_read_bug)
10+
{
11+
# We'd prefer to use "local $TODO", but the bug causes this test file to
12+
# die(), not merely to fail.
13+
planskip_all=>'filesystem bug';
14+
}
15+
else
16+
{
17+
plantests=> 4;
18+
}
19+
920
# Initialize primary node
1021
my$node_primary = PostgreSQL::Test::Cluster->new('primary');
1122
$node_primary->init(allows_streaming=> 1);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp