Configuration parameter

in_hot_standby — PostgreSQL configuration parameter

Category Preset Options

Reports whether the server is currently in hot standby mode.

At a glance

Property Value
Parameter in_hot_standby
Category Preset Options
Default (see documentation)
Value type boolean (on/off)
Change scope Per-session (SET)
Available in PostgreSQL 14, 15, 16, 17, 18, 19 (added in 14)

What it does

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 hot_standby for more information.

(Description quoted from the official PostgreSQL documentation.)

How to apply a change

Can be set per session with SET, per role/database with ALTER ROLE/DATABASE ... SET, or globally in postgresql.conf.

Inspect the current value and source with SHOW in_hot_standby; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'in_hot_standby';.

Tuning guidance

This is a preset, read-only parameter: it reports a value fixed when PostgreSQL was built or the cluster was initialized, and cannot be tuned at runtime. Read it to verify the server’s build or cluster configuration (for example when matching a replica or debugging a compatibility issue); there is no setting to adjust.

Reference

PostgreSQL documentation — in_hot_standby.

Keep going

Related & next steps

Was this helpful?

← All configuration parameters