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

                    • 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 ...
                    • 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 ...
                    • 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 ...
                    • Troubleshooting 'NLB is not configured in this Server' error

                      The following conditions must be met before you can proceed to troubleshoot WMI nodes: 1. The node should have been successfully added via WMI. 2. WMI should be working properly on the remote server. Using wbemtest.exe to troubleshoot WMI: 1. Open ...
                    • 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 ...