I have a setup with asynchronous streaming replication so that PSQL1 is primary and PSQL2 is hot standby. Since PSQL2 is running in hot standby mode I can do run queries against it.
Is it possible on PSQL2 to tell whether PSQL1 is still active or already shutdown?
I tried select pg_is_in_recovery();
but it returns true regardless whether PSQL1 is running or not.