Add new fields to show pool_nodes command and friends.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Sat, 27 Feb 2021 07:34:49 +0000 (16:34 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Sat, 27 Feb 2021 07:34:49 +0000 (16:34 +0900)
commit1ae1f159b89f4d18a8f7b737929e9a6448ad63ab
tree86e1049da76834a600a06cc44f6d4bca33b951d3
parent6d61d3a1fc111bd017d40cba7c68ff0236aff0a8
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.
20 files changed:
doc.ja/src/sgml/ref/pcp_node_info.sgml
doc.ja/src/sgml/ref/pgpool_adm_pcp_node_info.sgml
doc.ja/src/sgml/ref/show_pool_nodes.sgml
doc/src/sgml/ref/pcp_node_info.sgml
doc/src/sgml/ref/pgpool_adm_pcp_node_info.sgml
doc/src/sgml/ref/show_pool_nodes.sgml
src/include/pcp/libpcp_ext.h
src/libs/pcp/pcp.c
src/pcp_con/pcp_child.c
src/pcp_con/pcp_worker.c
src/sql/pgpool_adm/Makefile
src/sql/pgpool_adm/pgpool_adm--1.3--1.4.sql [new file with mode: 0644]
src/sql/pgpool_adm/pgpool_adm--1.4.sql [new file with mode: 0644]
src/sql/pgpool_adm/pgpool_adm.c
src/sql/pgpool_adm/pgpool_adm.control
src/test/regression/tests/003.failover/create_expected.sql
src/test/regression/tests/003.failover/create_expected_node0.sql
src/test/regression/tests/003.failover/test.sh
src/tools/pcp/pcp_frontend_client.c
src/utils/pool_process_reporting.c