pgvector.git / summary / log / commit / refs
commit 4eb722850227947aec6e4bc8dae143acb72a07cb
Author: Andrew Kane <andrew@ankane.org>
Date: Tue Apr 20 21:55:52 2021 +0000
Fixed TAP test for Postgres 9.6
.github/workflows/build.yml | 3 +--
t/001_wal.pl | 11 +++++++++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index f789aba8..63113ac1 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -23,5 +23,4 @@ jobs:
export PG_CONFIG=`which pg_config`
sudo --preserve-env=PG_CONFIG make install
- run: make installcheck
- - if: ${{ matrix.postgres != 9.6 }}
- run: make prove_installcheck
+ - run: make prove_installcheck
diff --git a/t/001_wal.pl b/t/001_wal.pl
index e1fe5fe5..35bb5e1e 100644
--- a/t/001_wal.pl
+++ b/t/001_wal.pl
@@ -17,8 +17,15 @@ sub test_index_replay
# Wait for replica to catch up
my $applname = $node_replica->name;
- my $caughtup_query =
- "SELECT pg_current_wal_lsn() <= write_lsn FROM pg_stat_replication WHERE application_name = '$applname';";
+
+ my $caughtup_query;
+ my $server_version_num = $node_primary->safe_psql("postgres", "SHOW server_version_num");
+ if ($server_version_num >= 100000) {
+ $caughtup_query = "SELECT pg_current_wal_lsn() <= write_lsn FROM pg_stat_replication WHERE application_name = '$applname';";
+ } else {
+ $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)
or die "Timed out while waiting for replica 1 to catch up";
[parent: a3d946f3bf69]