RE: BUG: Former primary node might stuck when started as a standby

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Alexander Lakhin' <exclusion(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Aleksander Alekseev <aleksander(at)timescale(dot)com>
Subject: RE: BUG: Former primary node might stuck when started as a standby
Date: 2026-03-03 09:17:16
Message-ID: OS9PR01MB121491FE3BD5D9D7341B83537F57FA@OS9PR01MB12149.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear Alexander,

> FWIW, 004_timeline_switch also failed the past month in the same way [2].

Thanks for the info. So I can provide the patch after the issue for 009_twophase.pl
is fixed. For better understanding we may be able to fork new thread.

> I've just tested 012_subtransactions.pl with the script I proposed at [3]
> and it passed 100 iterations (because it performs $node_primary->stop;
> before $node_standby->promote;, I suppose).

I guess so. cluster::stop does the `pg_ctl stop -m fast` command. In this case
the walsender waits till there are nothing to be sent, see WalSndLoop().
Do let me know if you have observed the similar failure here.

Best regards,
Hayato Kuroda
FUJITSU LIMITED

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2026-03-03 09:25:06 Re: Non-text mode for pg_dumpall
Previous Message Peter Eisentraut 2026-03-03 09:09:41 Re: Make use of unvolatize() in vac_truncate_clog()