Contents
pg_is_in_recovery()
A system function for retrieving the recovery status of an instance
pg_is_in_recovery()
is a system function for retrieving the recovery status of an instance.
pg_is_in_recovery()
was added in PostgreSQL 9.0.
Examples
Basic usage example for pg_is_in_recovery()
:
postgres=# SELECT pg_is_in_recovery(); pg_is_in_recovery ------------------- t (1 row) postgres=# SELECT pg_promote(); pg_promote ------------ t (1 row) postgres=# SELECT pg_is_in_recovery(); pg_is_in_recovery ------------------- f (1 row)
References
- PostgreSQL documentation: Recovery Information Functions