pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
Cc: Alexander Lakhin <exclusion@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Cc: Aleksander Alekseev <aleksander@timescale.com>
Subject: Re: BUG: Former primary node might stuck when started as a standby
Date: Wed, 4 Mar 2026 15:30:58 +0900
Message-ID: <aafRom_SDdZXeIKG@paquier.xyz> (raw)
In-Reply-To: <aafRT3EJOS274tw1@paquier.xyz>
References: <OS9PR01MB12149D4F1A2BC23637688CE4DF56BA@OS9PR01MB12149.jpnprd01.prod.outlook.com>
	<045cab6f-4738-417e-b551-01adba44d6c3@gmail.com>
	<c7284102-01fb-4704-8a80-8e65f59fa933@gmail.com>
	<aaU5EiNHfyMb9Bvu@paquier.xyz>
	<TYRPR01MB12156CC5A9AC774B07FA7E40BF57FA@TYRPR01MB12156.jpnprd01.prod.outlook.com>
	<aaZ77VvZ4Oabp30A@paquier.xyz>
	<493401a8-063f-436a-8287-a235d9e065fc@gmail.com>
	<OS9PR01MB121491FE3BD5D9D7341B83537F57FA@OS9PR01MB12149.jpnprd01.prod.outlook.com>
	<aafDsb5snkfkNfdS@paquier.xyz>
	<aafRT3EJOS274tw1@paquier.xyz>

On Wed, Mar 04, 2026 at 03:29:35PM +0900, Michael Paquier wrote:
> I'll push this fix shortly, taking care of one instability.  Nice
> investigation on this one, Alexander, by the way.

With the patch attached, for reference..
--
Michael
diff --git a/src/test/recovery/t/009_twophase.pl b/src/test/recovery/t/009_twophase.pl
index 879e493b5b83..aa73d3e106c5 100644
--- a/src/test/recovery/t/009_twophase.pl
+++ b/src/test/recovery/t/009_twophase.pl
@@ -222,7 +222,7 @@ $cur_primary->psql(
 	SAVEPOINT s1;
 	INSERT INTO t_009_tbl VALUES (22, 'issued to ${cur_primary_name}');
 	PREPARE TRANSACTION 'xact_009_10';");
-$cur_primary->teardown_node;
+$cur_primary->stop;
 $cur_standby->promote;
 
 # change roles

Attachments:

  [text/plain] 2pc-tap-fix.patch (469B, ../aafRom_SDdZXeIKG@paquier.xyz/2-2pc-tap-fix.patch)
  download | inline diff:
diff --git a/src/test/recovery/t/009_twophase.pl b/src/test/recovery/t/009_twophase.pl
index 879e493b5b83..aa73d3e106c5 100644
--- a/src/test/recovery/t/009_twophase.pl
+++ b/src/test/recovery/t/009_twophase.pl
@@ -222,7 +222,7 @@ $cur_primary->psql(
 	SAVEPOINT s1;
 	INSERT INTO t_009_tbl VALUES (22, 'issued to ${cur_primary_name}');
 	PREPARE TRANSACTION 'xact_009_10';");
-$cur_primary->teardown_node;
+$cur_primary->stop;
 $cur_standby->promote;
 
 # change roles

  [application/pgp-signature] signature.asc (832B, ../aafRom_SDdZXeIKG@paquier.xyz/3-signature.asc)
  download

view thread (30+ messages)  latest in thread

Message-ID: <aafRom_SDdZXeIKG@paquier.xyz>
Permalink:  ../aafRom_SDdZXeIKG@paquier.xyz/
Also on:    postgresql.org/message-id/aafRom_SDdZXeIKG@paquier.xyz

 ·  · 

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-hackers@postgresql.org
  Cc: michael@paquier.xyz, kuroda.hayato@fujitsu.com, exclusion@gmail.com, aleksander@timescale.com
  Subject: Re: BUG: Former primary node might stuck when started as a standby
  In-Reply-To: <aafRom_SDdZXeIKG@paquier.xyz>

* 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