Use write location for Postgres 9.6

This commit is contained in:
Andrew Kane
2021-04-26 03:50:01 -07:00
parent 773a63bed1
commit 60814b8f39

View File

@@ -23,7 +23,8 @@ sub test_index_replay
if ($server_version_num >= 100000) {
$caughtup_query = "SELECT pg_current_wal_lsn() <= replay_lsn FROM pg_stat_replication WHERE application_name = '$applname';";
} else {
$caughtup_query = "SELECT pg_current_xlog_location() <= replay_location FROM pg_stat_replication WHERE application_name = '$applname';";
# TODO figure out why replay location doesn't work
$caughtup_query = "SELECT pg_current_xlog_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
}
$node_primary->poll_query_until('postgres', $caughtup_query)