---
name: "pgpool_adm_pcp_health_check_stats"
section: "3"
platform: "linux"
package: "pgpool2"
version: "4.6.1-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/pgpool_adm_pcp_health_check_stats"
---

# pgpool\_adm\_pcp\_health\_check\_stats(3)

a function to display health check statistics data on given node ID

## 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***);**

## DESCRIPTION

**pcp\_health\_check\_stats** displays health check statistics data on given node ID.

## ARGUMENTS

*node\_id*

The index of backend node to get information of.

*pcp\_server*

The foreign server name for pcp server.

**Other arguments**

See [**pcp\_common\_options**(1)](/pcp_common_options/1.md).

## EXAMPLE

Here is an example output:

```
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      |
```

See Table 29, “Statistics data shown by pool\_health\_check\_stats command” for details of data.
