[pgpool-general: 8367] Re: pgpoolAdmin 4.2 doesnt see state of postgres, but pcp_status and "show pool_nodes" works

Bo Peng pengbo at sraoss.co.jp
Fri Sep 2 11:52:26 JST 2022


Hello,

On Wed, 31 Aug 2022 15:28:46 +0200 (CEST)
"Michal Jerabek" <jerabkin at post.cz> wrote:

> 
> Hello,
> 
> 
> 
> 
> i  made install of 2 nodes with postgresql-14 (4.6), pgpool-II (4.3.2.) and 
> pgpoolAdmin on RHEL 8.6 (selinux permissive), all postgres related 
> components from repos (https://download.postgresql.org/pub/repos/yum/14/
> redhat/rhel-8-x86_64/ and https://apt.postgresql.org/pub/repos/yum/common/
> redhat/rhel-8-x86_64/).
> 
> 
> 
> 
> And I have problem that pgpoolAdmin component show state of postgres always 
> "down" either in pgpool status and Node status , but postgres is running, 
> standard database connection to db backend throught  pgpool works and I am 
> able to attach and dettach nodes from command line.
> 
> 
> 
> 
> PCP status command shows right state of components, and also query to "show 
> pool_nodes" works, where should be a problem? where pgpoolAdmin get states 
> from?

PgpoolAdmin runs PCP command to get the states.
Please make sure that your Apache user is able to read .pcppass and pcp.conf.


> pcp_status
> Node 0:
> Hostname               : 172.27.8.249
> Port                   : 5432
> Status                 : 2
> Weight                 : 0.500000
> Status Name            : up
> Backend Status Name    : up
> Role                   : primary
> Backend Role           : primary
> Replication Delay      : 0
> Replication State      : none
> Replication Sync State : none
> Last Status Change     : 2022-08-31 15:07:04
> 
> 
> Node 1:
> Hostname               : 172.27.8.250
> Port                   : 5432
> Status                 : 2
> Weight                 : 0.500000
> Status Name            : up
> Backend Status Name    : up
> Role                   : standby
> Backend Role           : primary
> Replication Delay      : 402654288
> Replication State      : none
> Replication Sync State : none
> Last Status Change     : 2022-08-31 15:07:04
> 
> 
> 
> 
> 
> (of course there is no correct active/standby state, both backend are 
> primary, prepared for recovery/sync)
> 
> 
> 
> 
> 
> $ psql -h VIPADDRESS -p 5433 -U pgpool postgres -c "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_sta
> tus_change
> ---------+--------------+------+--------+-----------+-----------+---------+-
> --------+------------+-------------------+-------------------+--------------
> -----+------------------------+---------
> ------------
>  0       | 172.27.8.249 | 5432 | up     | up        | 0.500000  | primary | 
> primary | 72         | false             | 0                 |              
>      |                        | 2022-08-
> 31 15:07:04
>  1       | 172.27.8.250 | 5432 | up     | up        | 0.500000  | standby | 
> primary | 83         | true              | 402654288         |              
>      |                        | 2022-08-
> 31 15:07:04
> (2 rows)
> 
> 
> 
> 
> 
> 
> Thank you for help
> 
> 
> 
> 
> Michal
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> I have similiar expierence wiht installing same versions of psql, pgpool-II 
> and pgpoolAdmin on Centos8 stream, where there is no problem there.


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


More information about the pgpool-general mailing list