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

Commit41d27ee

Browse files
committed
Close yet another race condition in replication slot test code
Buildfarm shows that this test has a further failure mode when acheckpoint starts earlier than expected, so we detect a "checkpointcompleted" line that's not the one we want. Change the config to tryand prevent this.Per buildfarmAuthor: Kyotaro Horiguchi <horikyota.ntt@gmail.com>Discussion:https://postgr.es/m/20210729.162038.534808353849568395.horikyota.ntt@gmail.com
1 parentefe169c commit41d27ee

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

‎src/test/recovery/t/019_replslot_limit.pl

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,21 @@
170170
"requested WAL segment [0-9A-F]+ has already been removed"),
171171
'check that required WAL segments are still available');
172172

173-
# Advance WAL again, the slot loses the oldest segment.
173+
# Create one checkpoint, to improve stability of the next steps
174+
$node_master->safe_psql('postgres',"CHECKPOINT;");
175+
176+
# Prevent other checkpoints from occurring while advancing WAL segments
177+
$node_master->safe_psql('postgres',
178+
"ALTER SYSTEM SET max_wal_size='40MB'; SELECT pg_reload_conf()");
179+
180+
# Advance WAL again. The slot loses the oldest segment by the next checkpoint
174181
my$logstart = get_log_size($node_master);
175182
advance_wal($node_master, 7);
176183

177-
# wait until the WARNING is issued
184+
# Now create another checkpoint and wait until the WARNING is issued
185+
$node_master->safe_psql('postgres',
186+
'ALTER SYSTEM RESET max_wal_size; SELECT pg_reload_conf()');
187+
$node_master->safe_psql('postgres',"CHECKPOINT;");
178188
my$invalidated = 0;
179189
for (my$i = 0;$i < 10000;$i++)
180190
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp