From 766eeddb293079e574c461632d50262ca9e01d06 Mon Sep 17 00:00:00 2001
From: Masahiko Sawada <sawada.mshk@gmail.com>
Date: Wed, 30 Sep 2026 10:12:24 -0700
Subject: [PATCH v1] Stabilize repack_decode.spec regression tests.

Commit 7164dcb66532 added the isolation test for
REPACK (CONCURRENTLY), but it wasn't immune to autovacuum activity.

Specify test_decoding options to skip decoding empty transactions to
stabilize it.

Per buildfarm animal skink.

Reported-by: Alexander Lakhin <exclusion@gmail.com>
Discussion: https://postgr.es/m/d704cde4-b1f2-48dc-8c5e-659d1128d286@gmail.com
Backpatch-through: 19
---
 src/test/modules/injection_points/specs/repack_decode.spec | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/test/modules/injection_points/specs/repack_decode.spec b/src/test/modules/injection_points/specs/repack_decode.spec
index c3efd9987b3..04f0df83a0a 100644
--- a/src/test/modules/injection_points/specs/repack_decode.spec
+++ b/src/test/modules/injection_points/specs/repack_decode.spec
@@ -40,13 +40,15 @@ step s1_wait_before_lock
 }
 step s1_decode
 {
-	SELECT count(*) FROM pg_logical_slot_peek_changes('s', NULL, NULL, 'include-rewrites', '1');
+	SELECT count(*) FROM pg_logical_slot_peek_changes('s', NULL, NULL, 'include-rewrites', '1',
+							  'skip-empty-xacts', '1', 'include-xids', '0');
 }
 # Show the decoded updates.  The row loaded by setup carries a random TOAST
 # value, so only the updates are stable enough to display.
 step s1_decode_updates
 {
-	SELECT data FROM pg_logical_slot_peek_changes('s', NULL, NULL, 'include-rewrites', '1')
+	SELECT data FROM pg_logical_slot_peek_changes('s', NULL, NULL, 'include-rewrites', '1',
+						     'skip-empty-xacts', '1', 'include-xids', '0')
 	WHERE data LIKE '%UPDATE%';
 }
 teardown
-- 
2.55.0

