Postgresql-12 replication status in recovery mode

postgresql

I have postgresql master server and a standby server. The standby will be in recovery mode(ie. will be consuming the wals shipped from the master node). The master will be read/write and the standby will not be able to query until its promoted(DR setup).

I wanted to know the replication status of the standby node(ie. Each wals restored in standby with time to time).

Version – postgresql 12.3

OS – centos 8

recovery.signal

Also is it possible to use streaming replication along with wal file shipping.

Best Answer

You can ask primary server about replication status of standby server(s) by using pg_stat_replication which is a system statistics view.

You can use WAL Archiving to setup a replication instead of / in addition to streaming replication