in_hot_standby
Read PG 18 manual ↗Reports whether the server is currently in hot standby mode.
- Type
- bool
- Context
- internal
- Measured default
- off
- Unit
- —
- Metadata snapshot
- 18
Definition PG 18 manual
Reports whether the server is currently in hot standby mode. When this is on, all transactions are forced to be read-only. Within a session, this can change only if the server is promoted to be primary. See Section 26.4 for more information.
Measured default history
| Version interval | Default |
|---|---|
| 14 – 19 | off |
Authored guidance from the GUC source snapshot; the version-specific manual above is the definition reference. View source ↗
How it works
Shows whether hot standby is currently active. It is read-only and cannot be changed with SET or configuration-file edits.
It changes as recovery enters or leaves hot-standby operation and is intended for feature detection by SQL code.
Interpret it with hot_standby, max_standby_streaming_delay, hot_standby_feedback. Applications and operations tooling may read in_hot_standby for capability or environment detection, but cannot SET it; cross-cluster comparisons must account for build, initdb, and current-database differences.
Operational considerations
Trying to change read-only in_hot_standby with SET or a configuration file.
Assuming every cluster, database, or vendor build reports the same value.
Ignoring the value in file-format or feature-compatibility checks.
Treating reported metadata as a performance target instead of an environment fact.
Workload guidance
OLAP: Not tunable. Use in_hot_standby to verify format, build, or resource assumptions on analytical nodes and keep every read/write candidate compatible.
OLTP: Not tunable. Record in_hot_standby as a deployment/capability fact; if it is unexpected, fix the binary, initdb, or database-creation process rather than trying SET.
SMALL: Not tunable. Preserve it in inventory and incident reports; do not custom-build or rebuild merely to change it without a demonstrated compatibility need.
Version history 2
- PG 16 → 17changed
- PG 13 → 14added
Related entries
Further reading
Definition snapshot: english-manuals:2b3be02ebde6485c88c49e4c6ad… · English manual source