Home > OS >  PostgreSQL replication slot - how to see standby nodes
PostgreSQL replication slot - how to see standby nodes

Time:11-21

I am using PostgreSQL 11.2. I have replication slots setup. I am able to commit to a table and see it on the standby. I have few more standbys. How can I see from the master what other standbys I have?

CodePudding user response:

By selecting from pg_stat_replication. client_addr will be the IP address of a standby.

CodePudding user response:

You can use the following query and check for client_addr, client_port, and client_hostname.

SELECT * FROM pg_stat_replication;
  • Related