From eed9088aacb69187734875ae94a6f97a1143193b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=81lvaro=20Herrera?= <alvherre@kurilemu.de>
Date: Tue, 7 Apr 2026 13:16:25 +0200
Subject: [PATCH] Fix tests under wal_level=minimal

Buildfarm members which have specifically configured to use
wal_level=minimal fail the repack regression tests, which require
wal_level=replica.  Add a temp config file to fix that.
---
 src/test/modules/injection_points/Makefile       | 3 +++
 src/test/modules/injection_points/meson.build    | 4 ++++
 src/test/modules/injection_points/wal_level.conf | 1 +
 3 files changed, 8 insertions(+)
 create mode 100644 src/test/modules/injection_points/wal_level.conf

diff --git a/src/test/modules/injection_points/Makefile b/src/test/modules/injection_points/Makefile
index 2cd7d87c533..2c7abe93632 100644
--- a/src/test/modules/injection_points/Makefile
+++ b/src/test/modules/injection_points/Makefile
@@ -19,6 +19,9 @@ ISOLATION = basic \
 	    syscache-update-pruned \
 	    heap_lock_update
 
+# some isolation tests require wal_level=replica
+ISOLATION_OPTS = --temp-config $(top_srcdir)/src/test/modules/injection_points/wal_level.conf
+
 # The injection points are cluster-wide, so disable installcheck
 NO_INSTALLCHECK = 1
 
diff --git a/src/test/modules/injection_points/meson.build b/src/test/modules/injection_points/meson.build
index a414abb924b..7a838259685 100644
--- a/src/test/modules/injection_points/meson.build
+++ b/src/test/modules/injection_points/meson.build
@@ -53,5 +53,9 @@ tests += {
     'runningcheck': false, # see syscache-update-pruned
     # Some tests wait for all snapshots, so avoid parallel execution
     'runningcheck-parallel': false,
+    # some tests require wal_level=replica
+    'regress_args': [
+      '--temp-config', files('wal_level.conf'),
+    ],
   },
 }
diff --git a/src/test/modules/injection_points/wal_level.conf b/src/test/modules/injection_points/wal_level.conf
new file mode 100644
index 00000000000..010abb193a8
--- /dev/null
+++ b/src/test/modules/injection_points/wal_level.conf
@@ -0,0 +1 @@
+wal_level=replica
-- 
2.47.3

