pgpool-II 4.6.3 Documentation
Prev | Up |  | Next

# SHOW POOL_BACKEND_STATS

## Name

SHOW POOL_BACKEND_STATS -- show backend SQL command statistics

## Synopsis

       SHOW POOL_BACKEND_STATS

## Description

`SHOW POOL_BACKEND_STATS` displays the node id, the hostname, the port, the status, the role, the SELECT/INSERT/UPDATE/DELETE/DDL/other query counts issued to each backend. Also error messages returned from backend are counted and shown, classified by the severity. The node id, the hostname, the port, the status, the role are same as SHOW POOL NODES.

select_cnt, insert_cnt, update_cnt, delete_cnt, ddl_cnt, other_cnt are the numbers of SQL command: SELECT, INSERT, UPDATE, DELETE, DDL and others issued since Pgpool-II started. Failed commands (for example SELECT from non-existing table) are counted. Commands rolled back are also counted. Currently, other than SELECT/WITH/INSERT/UPDATE/DELETE/CHECKPOINT/DEALLOCATE/DISCARD/EXECUTE/ EXPLAIN/LISTEN/LOAD/LOCK/NOTIFY/PREPARE/SET/SHOW/Transaction commands/UNLISTEN are considered as DDL.

Here is an example session:

    test=# show pool_backend_stats;
     node_id | hostname | port  | status |  role   | select_cnt | insert_cnt | update_cnt | delete_cnt | ddl_cnt | other_cnt | panic_cnt | fatal_cnt | error_cnt
    ---------+----------+-------+--------+---------+------------+------------+------------+------------+---------+-----------+-----------+-----------+-----------
     0       | /tmp     | 11002 | up     | primary | 12         | 10         | 30         | 0          | 2       | 30        | 0         | 0         | 1
     1       | /tmp     | 11003 | up     | standby | 12         | 0          | 0          | 0          | 0       | 23        | 0         | 0         | 1
    (2 rows)

Prev | Home | Next
SHOW POOL_HEALTH_CHECK_STATS | Up | pgpool_adm extension