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

Commit2520226

Browse files
committed
Ensure standby promotion point in 043_wal_replay_wait.pl
This commit ensures standby will be promoted at least at the primary insertLSN we have just observed. We use pg_switch_wal() to force the insert LSNto be written then wait for standby to catchup.Reported-by: Alexander LakhinDiscussion:https://postgr.es/m/1d7b08f2-64a2-77fb-c666-c9a74c68eeda%40gmail.com
1 parent85b98b8 commit2520226

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎src/test/recovery/t/043_wal_replay_wait.pl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,12 @@
177177
CALL pg_wal_replay_wait('${lsn4}');
178178
]);
179179

180+
# Make sure standby will be promoted at least at the primary insert LSN we
181+
# have just observed. Use pg_switch_wal() to force the insert LSN to be
182+
# written then wait for standby to catchup.
183+
$node_primary->safe_psql('postgres','SELECT pg_switch_wal();');
184+
$node_primary->wait_for_catchup($node_standby);
185+
180186
$log_offset =-s$node_standby->logfile;
181187
$node_standby->promote;
182188
$node_standby->wait_for_log('recovery is not in progress',$log_offset);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp