On Wed, Sep 30, 2026 at 12:05:09PM +0900, Michael Paquier wrote: > On Tue, Sep 29, 2026 at 05:17:19PM -0400, Tom Lane wrote: >> Given that the problem is expensive to reproduce, I doubt that >> bisecting to identify this still-hypothetical commit is worth the >> trouble; I was just curious to know if anyone already understood the >> connection. Now, if it turns out that Bingshuai's patch doesn't make >> prion happy, then we'll need to dig deeper. > > It's not that hard to reach. If I run three check-world builds in > parallel to load my laptop CPU (say HEAD, v19 and v18 with a > worktree), HEAD is able to fail rather reliably like 30%~40% of the > time, on this test. The problem is very easy to reach for the last > two weeks.
There is cheap way to reproduce the issue, as of two
pg_log_standby_snapshot() in ddl.sql:
@@ -231,6 +231,7 @@ ROLLBACK TO SAVEPOINT b;
INSERT INTO tr_sub(path) VALUES ('3-top-2-#2');
COMMIT;
+SELECT pg_log_standby_snapshot() IS NOT NULL;
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL,
'include-xids', '0', 'skip-empty-xacts', '1');
-- test whether a known, but not yet logged toplevel xact, followed by a
@@ -250,6 +251,7 @@ INSERT INTO tr_sub(path) VALUES ('5-top-1-#1');
COMMIT;
+SELECT pg_log_standby_snapshot() IS NOT NULL;
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL,
'include-xids', '0', 'skip-empty-xacts', '1');
-- check that DDL in aborted subtransactions handled correctly
See also the attached. This stuff reproduces quickly the assertion
failure.
--
Michael
diff --git a/contrib/test_decoding/sql/ddl.sql
b/contrib/test_decoding/sql/ddl.sql
index 8c5b150079e7..afc264312334 100644
--- a/contrib/test_decoding/sql/ddl.sql
+++ b/contrib/test_decoding/sql/ddl.sql
@@ -231,6 +231,7 @@ ROLLBACK TO SAVEPOINT b;
INSERT INTO tr_sub(path) VALUES ('3-top-2-#2');
COMMIT;
+SELECT pg_log_standby_snapshot() IS NOT NULL;
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL,
'include-xids', '0', 'skip-empty-xacts', '1');
-- test whether a known, but not yet logged toplevel xact, followed by a
@@ -250,6 +251,7 @@ INSERT INTO tr_sub(path) VALUES ('5-top-1-#1');
COMMIT;
+SELECT pg_log_standby_snapshot() IS NOT NULL;
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL,
'include-xids', '0', 'skip-empty-xacts', '1');
-- check that DDL in aborted subtransactions handled correctly
signature.asc
Description: PGP signature
