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

Commit1a8b110

Browse files
committed
Fix second race condition in 002_archiving.pl with archive_cleanup_command
Checking the execution of archive_cleanup_command on a standby requiresa valid checkpoint coming from its primary, but the logic did not checkthat the standby replayed up to the point of the checkpoint, causing thetest checking for the execution of archive_cleanup_command to fail.This race was more visible in slow environments.Issue introduced in46dea24, so no backpatch is needed.Author: Tom LaneDiscussion:https://postgr.es/m/4015413.1649454951@sss.pgh.pa.us
1 parent676eeb6 commit1a8b110

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/test/recovery/t/002_archiving.pl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,16 @@
4646
# Create some content on primary
4747
$node_primary->safe_psql('postgres',
4848
"CREATE TABLE tab_int AS SELECT generate_series(1,1000) AS a");
49-
my$current_lsn =
50-
$node_primary->safe_psql('postgres',"SELECT pg_current_wal_lsn();");
5149

5250
# Note the presence of this checkpoint for the archive_cleanup_command
5351
# check done below, before switching to a new segment.
5452
$node_primary->safe_psql('postgres',"CHECKPOINT");
5553

54+
# Done after the checkpoint to ensure that it is replayed on the standby,
55+
# for archive_cleanup_command.
56+
my$current_lsn =
57+
$node_primary->safe_psql('postgres',"SELECT pg_current_wal_lsn();");
58+
5659
# Force archiving of WAL file to make it present on primary
5760
$node_primary->safe_psql('postgres',"SELECT pg_switch_wal()");
5861

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp