pg.ddx.io  pgpool-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgpool: Feature: Wait for follow_primary completion and report
3+ messages / 1 participants
[nested] [flat]

* pgpool: Feature: Wait for follow_primary completion and report
@ 2026-04-15 00:29 Taiki Koshino <koshino@sraoss.co.jp>
  0 siblings, 0 replies; 3+ messages in thread

From: Taiki Koshino @ 2026-04-15 00:29 UTC (permalink / raw)
  To: pgpool-committers@lists.postgresql.org

Feature: Wait for follow_primary completion and report
failure in pcp_promote_node and enhence failover script.

This commit enhances the pcp_promote_node command to wait for
the completion of the follow_primary command triggered during
failover and enhance failover script.

Add pcp_follow_primary_wait and pcp_follow_primary_succeeded
members to Req_info. The pcp worker sets pcp_follow_primary_wait
to true before initiating failover and waits until it is cleared
by the follow_primary process.

The follow_primary execution side clears pcp_follow_primary_wait
when the processing finishes, and sets pcp_follow_primary_succeeded
to false if any error occurs during execution.

If follow_primary fails, pcp_promote_node reports an ERROR instead of
returning success, allowing users to detect failures directly from the
command result.

Enhance failover.sample.sh to checkpoint on old primary node before promote.

Branch
------
V4_7_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=ba0317d7d2dec2c8b1d4936a25c2a029d720c...

Modified Files
--------------
doc.ja/src/sgml/ref/pcp_watchdog_info.sgml | 11 ++++++++---
doc/src/sgml/ref/pcp_watchdog_info.sgml    | 10 +++++++---
src/include/pcp/pcp.h                      |  1 +
src/include/watchdog/watchdog.h            |  2 ++
src/include/watchdog/wd_commands.h         |  2 ++
src/include/watchdog/wd_ipc_defines.h      |  2 +-
src/include/watchdog/wd_lifecheck.h        |  3 ++-
src/libs/pcp/pcp.c                         |  6 ++++++
src/tools/pcp/pcp_frontend_client.c        |  8 +++++---
src/watchdog/watchdog.c                    | 13 +++++++++++++
src/watchdog/wd_commands.c                 |  7 +++++++
src/watchdog/wd_json_data.c                |  4 +++-
src/watchdog/wd_lifecheck.c                | 10 +++++++++-
13 files changed, 66 insertions(+), 13 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgpool: Feature: Wait for follow_primary completion and report
@ 2026-04-15 00:47 Taiki Koshino <koshino@sraoss.co.jp>
  0 siblings, 0 replies; 3+ messages in thread

From: Taiki Koshino @ 2026-04-15 00:47 UTC (permalink / raw)
  To: pgpool-committers@lists.postgresql.org

Feature: Wait for follow_primary completion and report
failure in pcp_promote_node and enhence failover script.

This commit enhances the pcp_promote_node command to wait for
the completion of the follow_primary command triggered during
failover and enhance failover script.

Add pcp_follow_primary_wait and pcp_follow_primary_succeeded
members to Req_info. The pcp worker sets pcp_follow_primary_wait
to true before initiating failover and waits until it is cleared
by the follow_primary process.

The follow_primary execution side clears pcp_follow_primary_wait
when the processing finishes, and sets pcp_follow_primary_succeeded
to false if any error occurs during execution.

If follow_primary fails, pcp_promote_node reports an ERROR instead of
returning success, allowing users to detect failures directly from the
command result.

Enhance failover.sample.sh to checkpoint on old primary node before promote.

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=57fe60647d198760cd3199f6904d90f743a44...

Modified Files
--------------
doc.ja/src/sgml/ref/pcp_watchdog_info.sgml | 11 ++++++++---
doc/src/sgml/ref/pcp_watchdog_info.sgml    | 10 +++++++---
src/include/pcp/pcp.h                      |  1 +
src/include/watchdog/watchdog.h            |  2 ++
src/include/watchdog/wd_commands.h         |  2 ++
src/include/watchdog/wd_ipc_defines.h      |  2 +-
src/include/watchdog/wd_lifecheck.h        |  3 ++-
src/libs/pcp/pcp.c                         |  6 ++++++
src/tools/pcp/pcp_frontend_client.c        |  8 +++++---
src/watchdog/watchdog.c                    | 13 +++++++++++++
src/watchdog/wd_commands.c                 |  7 +++++++
src/watchdog/wd_json_data.c                |  4 +++-
src/watchdog/wd_lifecheck.c                | 10 +++++++++-
13 files changed, 66 insertions(+), 13 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgpool: Feature: Wait for follow_primary completion and report failure
@ 2026-11-13 02:25 Taiki Koshino <koshino@sraoss.co.jp>
  0 siblings, 0 replies; 3+ messages in thread

From: Taiki Koshino @ 2026-11-13 02:25 UTC (permalink / raw)
  To: pgpool-committers@lists.postgresql.org

Feature: Wait for follow_primary completion and report failure in pcp_promote_node.

This commit enhances the pcp_promote_node command to wait for completion of failover
and follow_primary processing, and reports which script failed when an error occurs
in the failover or follow_primary script.

Add pcp_promote_node_wait and pcp_promote_failed_command members to Req_info.
The PCP worker sets pcp_promote_node_wait to true before initiating failover
and waits until it becomes false by the failover or follow_primary execution side.

The failover and follow_primary execution side set pcp_promote_node_wait to false
when processing finishes. If an error occurs during script execution, they store
the failed command in pcp_promote_failed_command.

If failover or follow_primary command execution fails, pcp_promote_node reports
an ERROR with the failed command instead of returning success, allowing users
to detect failures directly from the command result.

Discussion: https://github.com/pgpool/pgpool2/issues/147

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=e780d9f784021a1c5fb349104f63e542f1e18...

Modified Files
--------------
src/include/pool.h                                 |   5 +
src/main/pgpool_main.c                             |  17 ++
src/pcp_con/pcp_worker.c                           |  30 +++
src/test/regression/tests/034.promote_node/test.sh | 180 ++++++++++++++-
src/test/regression/tests/046.detach_node/test.sh  | 257 +++++++++++++++++++++
.../tests/127.invalid_failover_node/test.sh        |   2 +-
6 files changed, 487 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2026-11-13 02:25 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-04-15 00:29 pgpool: Feature: Wait for follow_primary completion and report Taiki Koshino <koshino@sraoss.co.jp>
2026-04-15 00:47 pgpool: Feature: Wait for follow_primary completion and report Taiki Koshino <koshino@sraoss.co.jp>
2026-11-13 02:25 pgpool: Feature: Wait for follow_primary completion and report failure Taiki Koshino <koshino@sraoss.co.jp>

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