aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Davis <jdavis@postgresql.org>2022-04-08 03:21:12 -0700
committerJeff Davis <jdavis@postgresql.org>2022-04-08 03:21:12 -0700
commitdad9ba1c82fd985aa6fb8035ebca1e79c138dde2 (patch)
treec1761e47cdebfa2f2ba66dc99ce87ed7a22a8c37
parent12aaae5131af343b7cd2fdef05dee82c25d8aaf8 (diff)
downloadpostgresql-dad9ba1c82fd985aa6fb8035ebca1e79c138dde2.tar.gz
postgresql-dad9ba1c82fd985aa6fb8035ebca1e79c138dde2.zip
Fix buildfarm failures in pg_walinspect tests.
-rw-r--r--contrib/pg_walinspect/Makefile6
-rw-r--r--contrib/pg_walinspect/expected/pg_walinspect.out12
-rw-r--r--contrib/pg_walinspect/sql/pg_walinspect.sql8
-rw-r--r--contrib/pg_walinspect/walinspect.conf2
4 files changed, 20 insertions, 8 deletions
diff --git a/contrib/pg_walinspect/Makefile b/contrib/pg_walinspect/Makefile
index 350845cd43d..960530eb6c1 100644
--- a/contrib/pg_walinspect/Makefile
+++ b/contrib/pg_walinspect/Makefile
@@ -11,6 +11,12 @@ DATA = pg_walinspect--1.0.sql
REGRESS = pg_walinspect
+REGRESS_OPTS = --temp-config $(top_srcdir)/contrib/pg_walinspect/walinspect.conf
+
+# Disabled because these tests require "wal_level=replica", which
+# some installcheck users do not have (e.g. buildfarm clients).
+NO_INSTALLCHECK = 1
+
ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
diff --git a/contrib/pg_walinspect/expected/pg_walinspect.out b/contrib/pg_walinspect/expected/pg_walinspect.out
index 634b1bb7393..a1ee743457c 100644
--- a/contrib/pg_walinspect/expected/pg_walinspect.out
+++ b/contrib/pg_walinspect/expected/pg_walinspect.out
@@ -1,9 +1,13 @@
CREATE EXTENSION pg_walinspect;
-CREATE TABLE sample_tbl(col1 int, col2 int);
-- Make sure checkpoints don't interfere with the test.
-SELECT lsn as wal_lsn1 FROM
- pg_create_physical_replication_slot('regress_pg_walinspect_slot', true, false)
- \gset
+SELECT 'init' FROM pg_create_physical_replication_slot('regress_pg_walinspect_slot', true, false);
+ ?column?
+----------
+ init
+(1 row)
+
+CREATE TABLE sample_tbl(col1 int, col2 int);
+SELECT pg_current_wal_lsn() AS wal_lsn1 \gset
INSERT INTO sample_tbl SELECT * FROM generate_series(1, 2);
SELECT pg_current_wal_lsn() AS wal_lsn2 \gset
INSERT INTO sample_tbl SELECT * FROM generate_series(1, 2);
diff --git a/contrib/pg_walinspect/sql/pg_walinspect.sql b/contrib/pg_walinspect/sql/pg_walinspect.sql
index 1a9fd09e7be..1b265ea7bcc 100644
--- a/contrib/pg_walinspect/sql/pg_walinspect.sql
+++ b/contrib/pg_walinspect/sql/pg_walinspect.sql
@@ -1,11 +1,11 @@
CREATE EXTENSION pg_walinspect;
+-- Make sure checkpoints don't interfere with the test.
+SELECT 'init' FROM pg_create_physical_replication_slot('regress_pg_walinspect_slot', true, false);
+
CREATE TABLE sample_tbl(col1 int, col2 int);
--- Make sure checkpoints don't interfere with the test.
-SELECT lsn as wal_lsn1 FROM
- pg_create_physical_replication_slot('regress_pg_walinspect_slot', true, false)
- \gset
+SELECT pg_current_wal_lsn() AS wal_lsn1 \gset
INSERT INTO sample_tbl SELECT * FROM generate_series(1, 2);
diff --git a/contrib/pg_walinspect/walinspect.conf b/contrib/pg_walinspect/walinspect.conf
new file mode 100644
index 00000000000..67ceb2bb076
--- /dev/null
+++ b/contrib/pg_walinspect/walinspect.conf
@@ -0,0 +1,2 @@
+wal_level = replica
+max_replication_slots = 4