[pgpool-hackers: 3772] Re: More SQL stats?

Tatsuo Ishii ishii at sraoss.co.jp
Thu Aug 6 10:52:55 JST 2020


Hi Pgpool-II hackers,

>> test=# show pool_nodes;
>>  node_id | hostname | port  | status | lb_weight |  role   | select_cnt | insert_cnt | update_cnt | delete_cnt | ddl_cnt | other_cnt | load_balance_node | replication_delay | replication_state | replication_sync_state | last_status_change  
>> ---------+----------+-------+--------+-----------+---------+------------+------------+------------+------------+---------+-----------+-------------------+-------------------+-------------------+------------------------+---------------------
>>  0       | /tmp     | 11002 | up     | 0.500000  | primary | 0          | 11         | 1          | 1          | 10      | 10        | false             | 0                 |                   |                        | 2020-08-02 19:27:46
>>  1       | /tmp     | 11003 | up     | 0.500000  | standby | 1          | 0          | 0          | 0          | 0       | 4         | true              | 0                 | streaming         | async                  | 2020-08-02 19:27:46
>> (2 rows)
> 
> Attached patch is for regression 003 failover test, which needs
> modifications to sync with "show pool_nodes" output change.

My coleague suggested that it would be useful for admins if Pgpool-II
can provide error information like:

count of ERROR
count of FATAL
count of PANIC

This kind of statistics is not available in PostgreSQL, but I think it
is crusial for users.

If we implement it, probably we should have separate show command like
below because now the number of columns of "pgpool show" is too long.

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

What do yo think?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list