From e8730d8c04b61467be89d201b8c518b8bfb1ad7a Mon Sep 17 00:00:00 2001 From: Zhijie Hou Date: Wed, 5 Aug 2026 13:14:40 +0800 Subject: [PATCH v1] Fix BF failure for 023_twophase_stream The tap-test checks that the parallel apply worker reports an ERROR because max_prepared_transactions is zero. However, the log offset was captured after the publisher's prepared transaction had already run, so the expected ERROR might have been written to the log before the offset was recorded. This caused the subsequent wait_for_log() call to miss the message and time out. Fix by capturing the offset before the prepared transaction runs. Author: Zhijie Hou Reported-by: Alexander Lakhin --- src/test/subscription/t/023_twophase_stream.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/subscription/t/023_twophase_stream.pl b/src/test/subscription/t/023_twophase_stream.pl index e9e0f753f7c..fbb2dffbd95 100644 --- a/src/test/subscription/t/023_twophase_stream.pl +++ b/src/test/subscription/t/023_twophase_stream.pl @@ -439,6 +439,8 @@ debug_logical_replication_streaming = buffered )); $node_subscriber->restart; +$offset = -s $node_subscriber->logfile; + $node_publisher->safe_psql( 'postgres', q{ BEGIN; @@ -447,8 +449,6 @@ $node_publisher->safe_psql( COMMIT PREPARED 'xact'; }); -$offset = -s $node_subscriber->logfile; - # Confirm the ERROR is reported because max_prepared_transactions is zero $node_subscriber->wait_for_log( qr/ERROR: ( [A-Z0-9]+:)? prepared transactions are disabled/, $offset); -- 2.43.0