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

Commitbdecedb

Browse files
committed
Fix TAP test for PostgreSQL 9.6 and lower
1 parent845db08 commitbdecedb

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

‎t/001_wal.pl

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,23 @@ sub test_index_replay
1313
{
1414
my ($test_name) =@_;
1515

16+
# Check server version
17+
my$server_version =$node_master->safe_psql("postgres","SELECT current_setting('server_version_num');") + 0;
18+
1619
# Wait for standby to catch up
1720
my$applname =$node_standby->name;
18-
my$caughtup_query =
19-
"SELECT pg_current_wal_lsn() <= write_lsn FROM pg_stat_replication WHERE application_name = '$applname';";
21+
my$caughtup_query;
22+
23+
if ($server_version < 100000)
24+
{
25+
$caughtup_query =
26+
"SELECT pg_current_xlog_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
27+
}
28+
else
29+
{
30+
$caughtup_query =
31+
"SELECT pg_current_wal_lsn() <= write_lsn FROM pg_stat_replication WHERE application_name = '$applname';";
32+
}
2033
$node_master->poll_query_until('postgres',$caughtup_query)
2134
ordie"Timed out while waiting for standby 1 to catch up";
2235

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp