cluster_info detect recovery mode in version 12
Hello!
With postgresql-12 comes new standby/recovery management and recovery.conf file has been removed (source).
The pg_lsclusters
command must be able to detect recovery mode.
https://salsa.debian.org/postgresql/postgresql-common/blob/master/PgCommon.pm#L666
The pg_controldata
shows relevant state on a cluster data directory
sudo -u postgres /usr/lib/postgresql/12/bin/pg_controldata -D /var/lib/postgresql/12/lab1
...
Database cluster state: in production
... (or)
Database cluster state: in archive recovery
In a fast way, recovery.signal
and standby.signal
are good replacements in version 12.
Best regards, Florent