How to check whether the replication is configured or not in PostgreSQL DB-Server?

How to check whether the replication is configured or not in PostgreSQL DB-Server?

For Version 10 or above:

On master node:
Run the following command in psql shell:

      select client_addr, state, sent_lsn, write_lsn, flush_lsn, replay_lsn from pg_stat_replication;

Output:
If it displays "empty-set" --> replication is not configured properly
If replication slave details are listed --> replication is configured properly


For Version below 10:

On master node:
Run the following command in psql shell:

      select client_addr, state, sent_location, write_location,flush_location, replay_location from pg_stat_replication;

Output:
If it displays "empty-set" --> replication is not configured properly
If replication slave details are listed --> replication is configured properly

                  New to ADSelfService Plus?

                    • Related Articles

                    • How to check whether Microsoft NLB is configured or not in my Windows Server?

                      First, verify that your Windows server version must be 2008 and above to support NLB. Otherwise, NLB is not supported Then type wbemtest in the start menu to open the 'Windows Management Instrumentation Tester'. Use the namespace 'MicrosoftNLB' to ...
                    • Mail Server Monitor - Troubleshooting

                      Common Mail Server Monitor Errors and Troubleshooting Guide 1. Unknown Host Error Description: This error occurs when the mail client cannot resolve the hostname of the mail server to an IP address. The issue typically arises from DNS resolution ...
                    • RBM - Configure Content Check using Playback Script

                      Content Check option Applications Manager's Real Browser Monitoring allows to configure content check to be done on the webpages in between the steps. One can configure checks for both Content to be present and Content not to be present. Syntax of ...
                    • RBM - Configure Element Based Content Check using Playback Script

                      Element based Content Check option Applications Manager's Real Browser Monitoring allows to configure content check for a particular element in the webpages. One can configure checks for both Content to be present and Content not to be present for ...
                    • How to install Sys Database on Maria DB Server?

                      Issue: Solution: Download the MariaDB-sys from the GitHub using this link Extract the downloaded zip. Based on your MariaDB version open the corresponding file [ sys_56.sql, sys_57.sql, sys_10.sql ] Change all the relative path entries to static path ...