Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f15b76a commit ef585deCopy full SHA for ef585de
src/test/recovery/t/009_twophase.pl
@@ -331,6 +331,14 @@ sub configure_and_reload
331
CHECKPOINT;
332
COMMIT PREPARED 'xact_009_13';");
333
334
+# Ensure that last transaction is replayed on standby.
335
+my $cur_master_lsn =
336
+ $cur_master->safe_psql('postgres', "SELECT pg_current_wal_lsn()");
337
+my $caughtup_query =
338
+ "SELECT '$cur_master_lsn'::pg_lsn <= pg_last_wal_replay_lsn()";
339
+$cur_standby->poll_query_until('postgres', $caughtup_query)
340
+ or die "Timed out while waiting for standby to catch up";
341
+
342
$cur_standby->psql(
343
'postgres',
344
"SELECT count(*) FROM t_009_tbl2",
0 commit comments