Is there any unique identifier or any global variable which can tell us if replication is configured in current PostgreSQL server. Other than this query
The above query results whether the server is in recovery or not, If 't' we consider it as a slave and we can judge it is a part of replication but
If it is 'f' how can we determine the corresponding PostgreSQL server is a part of replication.
Because even a server which is not a part of replication will also return 'f' as a result of the above query.
You can say, why can't I run a query like
select * from pg_stat_replication;
which will return the list of slaves connected to it. Then we can determine it is a master or not.
Am facing a scenario like "if the master is having only one slave, after some time that slave went down, then how can we determine replication is configured or not in that server"