pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix intermittent test failure introduced in 6456c6e2c4.
Date: Thu, 11 Sep 2025 09:44:44 +0000
Message-ID: <E1uwdr9-000A3A-2Y@gemulon.postgresql.org> (raw)

Fix intermittent test failure introduced in 6456c6e2c4.

The test assumes that a backend will execute COMMIT PREPARED on the
publisher and hit the injection point commit-after-delay-checkpoint within
the commit critical section. This should cause the apply worker on the
subscriber to wait for the transaction to complete.

However, the test does not guarantee that the injection point is actually
triggered, creating a race condition where the apply worker may proceed
prematurely during COMMIT PREPARED.

This commit resolves the issue by explicitly waiting for the injection
point to be hit before continuing with the test, ensuring consistent and
reliable behavior.

Author: Zhijie Hou <houzj.fnst@fujitsu.com>
Reviewed-by: shveta malik <shveta.malik@gmail.com>
Discussion: https://postgr.es/m/TY4PR01MB1690751D1CA8C128B0770EC6F9409A@TY4PR01MB16907.jpnprd01.prod.outlook.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/01d793698f5921547a7b5e1e003722c17f552574

Modified Files
--------------
src/test/subscription/t/035_conflicts.pl | 3 +++
1 file changed, 3 insertions(+)



Message-ID: <E1uwdr9-000A3A-2Y@gemulon.postgresql.org>
Permalink:  ../E1uwdr9-000A3A-2Y@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1uwdr9-000A3A-2Y@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: akapila@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix intermittent test failure introduced in 6456c6e2c4.
  In-Reply-To: <E1uwdr9-000A3A-2Y@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox