[pgpool-general: 8368] Re: pool_nodes column descriptions

Bo Peng pengbo at sraoss.co.jp
Fri Sep 2 12:02:23 JST 2022


Hello,

On Thu, 1 Sep 2022 21:54:56 +0000
Jon SCHEWE <jon.schewe at raytheon.com> wrote:

> What is the difference between the "status" and "pg_status" columns?
> What is "role" vs. "pg_role"?

These columns mean:

  status:    status managed by pgpool
  pg_status: actual backend status
  role:      backend role managed by pgpool
  pg_role:   actual backend role 

For example, 
if you run pcp_detach_node to detach a node from Pgpool-II,
the "status" is "down" even if the backend node is running ("pg_status" is "up").

> See the output below.
> 
> What are status and pg_status telling me about psql-02 vs. psql-03?
> 
> What are role and pg_role telling me about psql-02 vs. psql-03?
> 
> postgres=> show pool_nodes;
>  node_id |       hostname       | port | status | pg_status | lb_weight |  role   | pg_role | select_cnt | load_balance_node | replication_delay | replication_state | replication_sync_state | last_status_change
> ---------+----------------------+------+--------+-----------+-----------+---------+---------+------------+-------------------+-------------------+-------------------+------------------------+---------------------
>  0       | psql-01.mgmt.bbn.com | 5432 | up     | up        | 0.333333  | primary | primary | 36296249   | true              | 0                 | streaming         | sync                   | 2022-09-01 17:09:56
>  1       | psql-02.mgmt.bbn.com | 5432 | down   | up        | 0.333333  | standby | standby | 33251154   | false             | 0                 |                   |                        | 2022-09-01 17:09:56
>  2       | psql-03.mgmt.bbn.com | 5432 | down   | down      | 0.333333  | standby | unknown | 23681056   | false             | 0                 | streaming         | potential              | 2022-09-01 17:09:56
> (3 rows)
> 
> 
> 
> 
> Jon Schewe
> 
> Principal Software Systems Technologist
> 
> C: +1 612.263.2718
> 
> O: +1 952.545.5720
> 
> jon.schewe at raytheon.com
> 
> Raytheon BBN
> 
> Raytheon Intelligence & Space
> 
> 5775 Wayzata Blvd. Suite 630
> 
> St. Louis Park, MN 55416
> 
> 
> RTX.com<https://www.rtx.com/> | LinkedIn<https://www.linkedin.com/company/raytheontechnologies> | Twitter<https://twitter.com/raytheontech> | Instagram<https://www.instagram.com/raytheontechnologies>
> 


-- 
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS LLC
https://www.sraoss.co.jp/



More information about the pgpool-general mailing list