PGPOOL_AD...HECK_STAT(3)

πŸ’– PGPOOL_AD...HECK_STAT πŸ’–

okay bestie, so this one is pgpool_adm_pcp_health_check_stats β€” yes the name is a whole journey, it lives in the pgpool-II 4.7.2 Documentation and it's a 3 section page, means it's a C library function situation. it's giving ✨functions✨, no cap.


✨ NAME ✨

pgpool_adm_pcp_health_check_stats β€” a function to display health check statistics data on given node ID πŸ©ΊπŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

pcp_health_check_stats returns record(integer node_id, text host,
                                      integer port, text username,
                                      text password,
                                      out node_id integer,
                                      out host text, out port integer,
                                      out status text, out role text,
                                      out last_status_change timestamp,
                                      out total_count bigint,
                                      out success_count bigint,
                                      out fail_count bigint,
                                      out skip_count bigint,
                                      out retry_count bigint,
                                      out average_retry_count bigint,
                                      out max_retry_count bigint,
                                      out max_health_check_duration bigint,
                                      out min_health_check_duration bigint,
                                      out average_health_check_duration float4,
                                      out last_health_check timestamp,
                                      out last_successful_health_check timestamp,
                                      out last_skip_health_check timestamp,
                                      out last_failed_health_check timestamp);
pcp_health_check_stats returns record(integer node_id, text pcp_server,
                                      out node_id integer,
                                      out host text, out port integer,
                                      out status text, out role text,
                                      out last_status_change timestamp,
                                      out total_count bigint,
                                      out success_count bigint,
                                      out fail_count bigint,
                                      out skip_count bigint,
                                      out retry_count bigint,
                                      out average_retry_count bigint,
                                      out max_retry_count bigint,
                                      out max_health_check_duration bigint,
                                      out min_health_check_duration bigint,
                                      out average_health_check_duration float4,
                                      out last_health_check timestamp,
                                      out last_successful_health_check timestamp,
                                      out last_skip_health_check timestamp,
                                      out last_failed_health_check timestamp);

so yes, two whole shapes of the same call. pick your fighter 😌


🌸 DESCRIPTION 🌸

pcp_health_check_stats displays health check statistics data on given node ID. that's it. that's the gig. it hands you the receipts on how your health checks have been going, node by node. main character energy honestly πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • node_id β€” the index of backend node to get information of. like, which one of your nodes, bestie 🫢
  • pcp_server β€” the foreign server name for pcp server. the ✨spicy alternative✨ to passing host/port/username/password by hand.
  • Other arguments β€” see pcp_common_options(1). the shared lore, iykyk πŸ“–

πŸ’œ EXAMPLE πŸ’œ

here's a lil example output so you know what to expect:

test=# select * from pcp_health_check_stats(node_id => 0, host => '', port => 11001, username => 't-ishii', password => 't-ishii');
-[ RECORD 1 ]-----------------+--------------------
node_id                       | 0
host                          | /tmp
port                          | 11002
status                        | up
role                          | primary
last_status_change            | 2020-02-25 16:05:29
total_count                   | 3
success_count                 | 3
fail_count                    | 0
skip_count                    | 0
retry_count                   | 0
average_retry_count           | 0
max_retry_count               | 0
max_health_check_duration     | 5
min_health_check_duration     | 3
average_health_check_duration | 4.333333
last_health_check             | 2020-02-25 16:05:47
last_successful_health_check  | 2020-02-25 16:05:47
last_skip_health_check        |
last_failed_health_check      |

look at that <rainbow>average_health_check_duration | 4.333333</rainbow> β€” she's precise πŸ’…

see Table 29, β€œStatistics data shown by pool_health_check_stats command” for details of data. go read the table, bestie, it explains every single column way better than I could in a group chat 🧚


and that's the whole page fr fr. this one's from pgpool-II 4.7.2, dated 2023, footer said PGPOOL_AD...HECK_STAT(3) and I would never gatekeep that from you. bye bb, happy health-checking πŸ©ΊπŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from