[pgpool-committers: 7546] pgpool: Add new fields to show pool_nodes command and friends.
Tatsuo Ishii
ishii at sraoss.co.jp
Sat Feb 27 16:39:07 JST 2021
Add new fields to show pool_nodes command and friends.
pg_status: actual DB node status. Either "up" or "down". The status is
fetched by using pg_isready command while executing show
pool_nodes. Arguments for pg_isready are obtained from health check
parameters. The reason for this choice is, pgpool already checks the
availability of PostgreSQL by using health check parameters. If health
check is disabled (health_check_period = 0), the status will be
"unknown".
pg_role: actual DB node status. Only meaningful in streaming
replication mode. Either "primary" or "standby". If
pg_is_in_recovery() returns true, it will be represented as "standby",
otherwise "primary". In other clustering modes, same as "role" field.
Arguments for querying to backend are obtained from
sr_check_parameters. The reason for this choice is, pgpool already
checks the role of PostgreSQL by using sr_check parameters. If
sr_check is disabled (sr_check_period = 0), the status will be
"unknown". For other clustering mode, value of "role" field is copied
to pg_role field.
Modified commands/functions are: show poool_nodes, pcp_node_info and
pgpool_adm_pcp_node_info.
Branch
------
master
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=1ae1f159b89f4d18a8f7b737929e9a6448ad63ab
Modified Files
--------------
doc.ja/src/sgml/ref/pcp_node_info.sgml | 78 +++++++----
doc.ja/src/sgml/ref/pgpool_adm_pcp_node_info.sgml | 28 +++-
doc.ja/src/sgml/ref/show_pool_nodes.sgml | 23 ++--
doc/src/sgml/ref/pcp_node_info.sgml | 70 +++++++---
doc/src/sgml/ref/pgpool_adm_pcp_node_info.sgml | 27 +++-
doc/src/sgml/ref/show_pool_nodes.sgml | 24 ++--
src/include/pcp/libpcp_ext.h | 4 +
src/libs/pcp/pcp.c | 13 +-
src/pcp_con/pcp_child.c | 8 +-
src/pcp_con/pcp_worker.c | 11 +-
src/sql/pgpool_adm/Makefile | 3 +-
src/sql/pgpool_adm/pgpool_adm--1.3--1.4.sql | 98 ++++++++++++++
src/sql/pgpool_adm/pgpool_adm--1.4.sql | 101 ++++++++++++++
src/sql/pgpool_adm/pgpool_adm.c | 84 +++++++-----
src/sql/pgpool_adm/pgpool_adm.control | 2 +-
.../tests/003.failover/create_expected.sql | 12 +-
.../tests/003.failover/create_expected_node0.sql | 12 +-
src/test/regression/tests/003.failover/test.sh | 4 +-
src/tools/pcp/pcp_frontend_client.c | 10 +-
src/utils/pool_process_reporting.c | 147 ++++++++++++++++++++-
20 files changed, 626 insertions(+), 133 deletions(-)
More information about the pgpool-committers
mailing list