[pgpool-general: 7169] Re: show pool_nodes not displaying replication_state or replication_sync_state

Tatsuo Ishii ishii at sraoss.co.jp
Thu Jul 30 22:05:59 JST 2020


> We have two postgresql nodes configured as primary and hot standby with
> streaming replication. Pgpool-II is configured on a third host to provide
> load balancing and health check monitoring to trigger failover.
> 
> When, on the Pgpool-II host, I execute:
> 
> $ psql -U pgpool --dbname=postgres --host localhost -c "show pool_nodes"
> 
> Neither the primary or the secondary node show anything for
> replication_state or replication_sync_state.
> 
> I have confirmed that the pgpool user is a postgresql superuser and I have
> also added that user to the pg_monitor group (just in case).
> 
> Our Master/Slave Mode pgpool.conf settings are:
> 
> master_slave_mode = on
> master_slave_sub_mode = 'stream'
> sr_check_period = 10
> sr_check_user = 'pgpool'
> 
> Given the above configuration should the replication_state and
> replication_sync_state be displayed for the secondary node? Are there any
> configuration settings I need to make to Postgres to enable this
> functionality?
> 
> I want to use the auto_failback option to reattach standby nodes, but I
> don't think this feature will work if Pgpool-II can't see this information.

Have you set "backend_application_name0" and
"backend_application_name1" parameter? Also you need to specify
"application_name" in primary_conninfo parameter in
postgresql.conf. The application name must match in
backend_application_name and primary_conninfo in postgresql.conf. For
example,

pgpool.conf:
backend_application_name0 = 'server0'
backend_application_name1 = 'server1'

primary_conninfo in postgresql.conf of node 0:
primary_conninfo = 'port=5432 user=postgres application_name=server0'

primary_conninfo in postgresql.conf of node 1:
primary_conninfo = 'port=5432 user=postgres application_name=server1'

Best regards,
--
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-general mailing list