[pgpool-committers: 7816] pgpool: Allow to specify node id to be promoted in pcp_promote_node.

Tatsuo Ishii ishii at sraoss.co.jp
Tue Jun 15 17:12:08 JST 2021


Allow to specify node id to be promoted in pcp_promote_node.

For this purpose new parameter "-s" or "--switchover" is added.  If
the parameter is specified, current primary node is detached and the
target node id is passed to the failover script's argument "main
node". Since most of failover script promotes the "main node", this
results in promoting the node specified in pcp_promote_node.

The idea was initially proposed by Nathan Ward.  Patch was created by
me and reviewed by: Nathan Ward, Umar Hayat and Lachezar Dobrev.

Discussion:
https://www.pgpool.net/pipermail/pgpool-general/2021-April/007532.html
https://www.pgpool.net/pipermail/pgpool-hackers/2021-June/003921.html

Branch
------
master

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

Modified Files
--------------
doc.ja/src/sgml/ref/pcp_promote_node.sgml          | 55 +++++++++++-
doc/src/sgml/ref/pcp_promote_node.sgml             | 99 +++++++++++++++++++---
src/include/pcp/libpcp_ext.h                       |  4 +-
src/include/pool.h                                 |  2 +
src/libs/pcp/pcp.c                                 | 33 ++++++--
src/main/pgpool_main.c                             | 39 +++++++--
src/pcp_con/pcp_worker.c                           | 63 +++++++++++---
src/test/regression/tests/034.promote_node/test.sh | 52 ++++++++++++
src/tools/pcp/pcp_frontend_client.c                | 28 ++++--
9 files changed, 325 insertions(+), 50 deletions(-)



More information about the pgpool-committers mailing list