Fix buildfarm failures in pg_walinspect tests.
authorJeff Davis <[email protected]>
Fri, 8 Apr 2022 10:21:12 +0000 (03:21 -0700)
committerJeff Davis <[email protected]>
Fri, 8 Apr 2022 10:21:12 +0000 (03:21 -0700)
contrib/pg_walinspect/Makefile
contrib/pg_walinspect/expected/pg_walinspect.out
contrib/pg_walinspect/sql/pg_walinspect.sql
contrib/pg_walinspect/walinspect.conf [new file with mode: 0644]

index 350845cd43d52570d0ad46b8b1fbae95ab2f35fd..960530eb6c1673408ba50204d8039145114d210b 100644 (file)
@@ -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)
index 634b1bb7393482ddc3cb2e8e5e631a28e7393283..a1ee743457cf5fcf5bd5d6afd2ce013b490f108e 100644 (file)
@@ -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);
index 1a9fd09e7bec027e1f71673b15d61ce1d799e28e..1b265ea7bccf381d0cb034c240800e744b3cff63 100644 (file)
@@ -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 (file)
index 0000000..67ceb2b
--- /dev/null
@@ -0,0 +1,2 @@
+wal_level = replica
+max_replication_slots = 4