pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bo Peng <pengbo@sraoss.co.jp>
To: VASUKI M <vasukim1992002@gmail.com>
To: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Cc: bharatdb@cdac.in <bharatdb@cdac.in>
Cc: pgpool-general@lists.postgresql.org <pgpool-general@lists.postgresql.org>
Subject: Re: Automating Failover Resync & Re-Attach in pgpool2
Date: Fri, 17 Oct 2025 07:55:26 +0000
Message-ID: <TYWP286MB263338A38132DF1F8AD4FC2EF2F6A@TYWP286MB2633.JPNP286.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CACTYHzgopGRZmWeWPLXKw=McAQigLC51+mqsmyULypKhfMSJ_w@mail.gmail.com>
References: <CACTYHzgopGRZmWeWPLXKw=McAQigLC51+mqsmyULypKhfMSJ_w@mail.gmail.com>

Hi,

Thank you for your question.

> While working with PostgreSQL failover scenarios, I noticed that the process of re-attaching a standby node 
> after a failover can be somewhat manual and prone to delays, especially in production environments.

After a failover, the standby nodes can be automatically attached to the new primary by setting "follow_primary_command".

    https://www.pgpool.net/docs/latest/en/html/runtime-config-failover.html#RUNTIME-CONFIG-FAILOVER-SETT...

You can also automatically reattach a failed standby node by setting "auto_failback = on".

    https://www.pgpool.net/docs/latest/ja/html/runtime-config-failover.html#GUC-AUTO-FAILBACK

---
Bo Peng <pengbo@sraoss.co.jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
Mobile: 080-7752-0749
URL: https://www.sraoss.co.jp/


________________________________________
$B:9=P?M(B: VASUKI M <vasukim1992002@gmail.com>
$BAw?.(B: 2025 $BG/(B 10 $B7n(B 10 $BF|(B ($B6bMKF|(B) 21:17
$B08@h(B: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Cc: bharatdb@cdac.in <bharatdb@cdac.in>; pgpool-general@lists.postgresql.org <pgpool-general@lists.postgresql.org>
$B7oL>(B: Automating Failover Resync & Re-Attach in pgpool2




Dear PostgreSQL and Pgpool Communities,
While working with PostgreSQL failover scenarios, I noticed that the process of re-attaching a standby node after a failover can be somewhat manual and prone to delays, especially in production environments.
I explored automating this process using a combination of pg_rewind and WAL replay, which allows a standby node to resynchronize and re-attach to the primary automatically after a failover. This could reduce downtime and simplify management of failover nodes in high-availability setups.
Automatically resynchronize after failover
Reduce downtime and ensure quicker recovery
Minimize manual operations and errors
Maintain consistent cluster state with less administrative overhead
I believe that integrating such an automated resync and re-attach feature into Pgpool-II could be very valuable for PostgreSQL users, potentially as an enhancement in a future release.
I wanted to share this idea with the community to get feedback, suggestions, or any pointers on existing work that may align with this. I am happy to contribute more details





view thread (4+ messages)  latest in thread

Message-ID: <TYWP286MB263338A38132DF1F8AD4FC2EF2F6A@TYWP286MB2633.JPNP286.PROD.OUTLOOK.COM>
Permalink:  ../TYWP286MB263338A38132DF1F8AD4FC2EF2F6A@TYWP286MB2633.JPNP286.PROD.OUTLOOK.COM/
Also on:    postgresql.org/message-id/TYWP286MB263338A38132DF1F8AD4FC2EF2F6A@TYWP286MB2633.JPNP286.PROD.OUTLOOK.COM

 · 

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-bugs@postgresql.org
  Cc: pengbo@sraoss.co.jp, vasukim1992002@gmail.com, pgsql-bugs@lists.postgresql.org, bharatdb@cdac.in, pgpool-general@lists.postgresql.org
  Subject: Re: Automating Failover Resync & Re-Attach in pgpool2
  In-Reply-To: <TYWP286MB263338A38132DF1F8AD4FC2EF2F6A@TYWP286MB2633.JPNP286.PROD.OUTLOOK.COM>

* 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