SHOW_POOL_HEALTH_CHECK_STATS(1)
show health check statistics data
Description
SHOW POOL_HEALTH_CHECK_STATS
NAME
SHOW_POOL_HEALTH_CHECK_STATS - show health check statistics data
SYNOPSIS
SHOW POOL_HEALTH_CHECK_STATS
DESCRIPTION
SHOW POOL_HEALTH_CHECK_STATS displays health check (see Section 5.8, “Health Check”, in the documentation) statistic data mostly collected by health check process. This command helps Pgpool-II admin to study events related to health check. For example, admin can easily locate the failover event in the log file by looking at "last_failed_health_check" column. Another example is finding unstable connection to backend by evaluating "average_retry_count" column. If particular node shows higher retry count than other node, there may be problem to the connection to the backend.
Table 25, “Statistics data shown by pool_health_check_stats command” shows each column name and its description.
Table 25. Statistics data shown by pool_health_check_stats command

Here is an example session:
test=# show
pool_health_check_stats;
-[ RECORD 1 ]----------------+--------------------
node_id | 0
hostname | /tmp
port | 11002
status | up
role | primary
last_status_change | 2020-01-26 19:08:45
total_count | 27
success_count | 27
fail_count | 0
skip_count | 0
retry_count | 0
average_retry_count | 0.000000
max_retry_count | 0
max_duration | 9
min_duration | 2
average_duration | 6.296296
last_health_check | 2020-01-26 19:12:45
last_successful_health_check | 2020-01-26 19:12:45
last_skip_health_check |
last_failed_health_check |
-[ RECORD 2 ]----------------+--------------------
node_id | 1
hostname | /tmp
port | 11003
status | down
role | standby
last_status_change | 2020-01-26 19:11:48
total_count | 19
success_count | 12
fail_count | 1
skip_count | 6
retry_count | 3
average_retry_count | 0.230769
max_retry_count | 3
max_duration | 83003
min_duration | 0
average_duration | 6390.307692
last_health_check | 2020-01-26 19:12:48
last_successful_health_check | 2020-01-26 19:10:15
last_skip_health_check | 2020-01-26 19:12:48
last_failed_health_check | 2020-01-26 19:11:48