- Issue the
pg_lsclustercommand against the cluster of concern, if it is a replica and not a master, under “status” you will see it with value of “online, recovery”. If it is writeable master db in a streaming replication set up however, it will not include the word “recovery”.
- From the psql client you can also issue the command:
select pg_is_in_recovery();and if it is a replica, it will say “T” or true.