logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SHOW_POOL_BACKEND_STATS - show backend SQL command statistics

Description

SHOWPOOL_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 (SHOW_POOL_NODES(1)).

       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)

pgpool-II 4.6.0                                       2023                            SHOWPOOL_BACKEND_STATS(1)

Name

       SHOW_POOL_BACKEND_STATS - show backend SQL command statistics

Synopsis

          SHOW POOL_BACKEND_STATS

See Also