[pgpool-general: 8678] Re: replication state not visible

Bo Peng pengbo at sraoss.co.jp
Wed Mar 29 14:23:54 JST 2023


Hello,

Pgpool executes "SELECT * FROM pg_stat_replication" to retrieve 
replication_state and replication_sync_state.

Could you try to connect to PostgreSQL primary using pgpool user
and run "SELECT * FROM pg_stat_replication"
on the server where pgpool is running?

  psql -h <PostgreSQL primary> -U pgpool -p <PostgreSQL port> -c "SELECT * FROM pg_stat_replication"


On Mon, 27 Mar 2023 12:37:06 +0000
Todd Stein <todd.stein at microfocus.com> wrote:

> Thank you.
> Attached is a zip file labeled as a txt file containing config files and logs.
> sr_check_user is specified as pgpool.  The pgpool user is in pg_monitor group.
> 
> 
> 
> Regards,
> 
> Todd Stein
> 
> -----Original Message-----
> From: Bo Peng <pengbo at sraoss.co.jp> 
> Sent: Monday, March 27, 2023 8:28 AM
> To: Todd Stein <todd.stein at microfocus.com>
> Cc: pgpool-general at pgpool.net
> Subject: Re: [pgpool-general: 8671] replication state not visible
> 
> Hello,
> 
> You also need to make sure the user specified in sr_check_user is PostgreSQL super user or or in pg_monitor group.
> 
> Grant pg_monitor to user:
> 
>   GRANT pg_monitor TO <username>;
>     
> 
> On Mon, 27 Mar 2023 11:29:50 +0000
> Todd Stein <todd.stein at microfocus.com> wrote:
> 
> > it is configured.  I sent config files and logs on a different thread 
> > ________________________________
> > From: Bo Peng <pengbo at sraoss.co.jp>
> > Sent: Monday, March 27, 2023 1:57:05 AM
> > To: Todd Stein <todd.stein at microfocus.com>
> > Cc: pgpool-general at pgpool.net <pgpool-general at pgpool.net>
> > Subject: Re: [pgpool-general: 8671] replication state not visible
> > 
> > Hello,
> > 
> > On Fri, 24 Mar 2023 15:38:03 +0000
> > Todd Stein <todd.stein at microfocus.com> wrote:
> > 
> > > While I do have the application field populated, I am not seeing the replication state in the show pool_nodes table.
> > 
> > You need to configure "backend_application_name" parameter.
> > 
> > Please see the following doc:
> > https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
> > pgpool.net%2Fdocs%2Flatest%2Fen%2Fhtml%2Fruntime-config-backend-settin
> > gs.html%23GUC-BACKEND-APPLICATION-NAME&data=05%7C01%7Ctodd.stein%40mic
> > rofocus.com%7C9276e0e0ddb64c804e0108db2ebeb357%7C856b813c16e549a585ec6
> > f081e13b527%7C0%7C0%7C638155168831102214%7CUnknown%7CTWFpbGZsb3d8eyJWI
> > joiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7
> > C%7C%7C&sdata=DrL8VzVxtQi%2FnGr5m1oK526MYhUq5wYLL2xhbhj6hAE%3D&reserve
> > d=0
> > 
> > > [postgres at catvmtspg02a DBToolkit]$ psql -x -h 10.78.121.1 -p 9999 -U pgpool postgres -c "show pool_nodes"
> > > Password for user pgpool:
> > > -[ RECORD 1 ]----------+-----------------------------
> > > node_id                | 0
> > > hostname               | catvmtspg02a.domain.net
> > > port                   | 5432
> > > status                 | up
> > > pg_status              | up
> > > lb_weight              | 0.333333
> > > role                   | primary
> > > pg_role                | primary
> > > select_cnt             | 0
> > > load_balance_node      | true
> > > replication_delay      | 0
> > > replication_state      |
> > > replication_sync_state |
> > > last_status_change     | 2023-03-24 10:52:59
> > > -[ RECORD 2 ]----------+-----------------------------
> > > node_id                | 1
> > > hostname               | catvmtspg02b.domain.net
> > > port                   | 5432
> > > status                 | up
> > > pg_status              | up
> > > lb_weight              | 0.333333
> > > role                   | standby
> > > pg_role                | standby
> > > select_cnt             | 0
> > > load_balance_node      | false
> > > replication_delay      | 0
> > > replication_state      |
> > > replication_sync_state |
> > > last_status_change     | 2023-03-24 10:52:59
> > > -[ RECORD 3 ]----------+-----------------------------
> > > node_id                | 2
> > > hostname               | catvmtspg02c.domain.net
> > > port                   | 5432
> > > status                 | up
> > > pg_status              | up
> > > lb_weight              | 0.333333
> > > role                   | standby
> > > pg_role                | standby
> > > select_cnt             | 0
> > > load_balance_node      | false
> > > replication_delay      | 0
> > > replication_state      |
> > > replication_sync_state |
> > > last_status_change     | 2023-03-24 10:52:59
> > >
> > > [postgres at catvmtspg02a DBToolkit]$
> > > [postgres at catvmtspg02a DBToolkit]$ psql -c "SELECT * FROM 
> > > pg_replication_slots;" -x -[ RECORD 1 ]-------+-----------------------------
> > > slot_name           | catvmtspg02c_domain_net
> > > plugin              |
> > > slot_type           | physical
> > > datoid              |
> > > database            |
> > > temporary           | f
> > > active              | t
> > > active_pid          | 1703
> > > xmin                |
> > > catalog_xmin        |
> > > restart_lsn         | 2/2A001A88
> > > confirmed_flush_lsn |
> > > wal_status          | reserved
> > > safe_wal_size       |
> > > two_phase           | f
> > > -[ RECORD 2 ]-------+-----------------------------
> > > slot_name           | catvmtspg02b_domain_net
> > > plugin              |
> > > slot_type           | physical
> > > datoid              |
> > > database            |
> > > temporary           | f
> > > active              | t
> > > active_pid          | 1822
> > > xmin                |
> > > catalog_xmin        |
> > > restart_lsn         | 2/2A001A88
> > > confirmed_flush_lsn |
> > > wal_status          | reserved
> > > safe_wal_size       |
> > > two_phase           | f
> > >
> > >
> > >
> > >
> > > Regards,
> > >
> > > Todd Stein
> > > OpsBridge Technical Success
> > > OpenText
> > > (Cell) +1 (941) 248-8752
> > > tstein2 at opentext.com<mailto:tstein2 at opentext.com>
> > >
> > 
> > 
> > --
> > Bo Peng <pengbo at sraoss.co.jp>
> > SRA OSS LLC
> > https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.
> > sraoss.co.jp%2F&data=05%7C01%7Ctodd.stein%40microfocus.com%7C9276e0e0d
> > db64c804e0108db2ebeb357%7C856b813c16e549a585ec6f081e13b527%7C0%7C0%7C6
> > 38155168831102214%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoi
> > V2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=xp5mkf%2F
> > VHbxnYwg8ZWX9kf%2BZfwQDgHXdwYrXeOWbDoc%3D&reserved=0
> 
> 
> --
> Bo Peng <pengbo at sraoss.co.jp>
> SRA OSS LLC
> https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.sraoss.co.jp%2F&data=05%7C01%7Ctodd.stein%40microfocus.com%7C9276e0e0ddb64c804e0108db2ebeb357%7C856b813c16e549a585ec6f081e13b527%7C0%7C0%7C638155168831102214%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=xp5mkf%2FVHbxnYwg8ZWX9kf%2BZfwQDgHXdwYrXeOWbDoc%3D&reserved=0


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


More information about the pgpool-general mailing list