↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

GUC Parameters / Preset Options

in_hot_standby

Read the PG 18 manual

Reports whether the server is currently in hot standby mode.

Reading PG 18current·documented in 7 of 24 versions, 14 to 20

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 intervalDefault
14 – 19off
Analysis & operational context

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
  1. 16 → 17 changed
  2. 13 → 14 added

Related entries

Further reading

Definition snapshot: english-manuals:f669a6a9ba86c93f869cd8dadff… · English manual source