{"Entry":{"collection":"guc","key":"in_hot_standby","name":"in_hot_standby","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Preset Options","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"13","status":"added","to":"14"},{"documentation_changed":true,"fields":{},"from":"16","status":"changed","to":"17"}],"content_hash":"7c0d8956ece1fac96d8697a146d12a75410bc611239b32da2162e9f950227347","context":"","default_changed_in":[],"default_history":[{"from":"14","to":"19","value":"off"}],"editorial":{"advice":{"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."},"mechanism":["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."],"pitfalls":["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."],"references":[{"title":"PostgreSQL 19 Beta 4: in_hot_standby","url":"https://www.postgresql.org/docs/19/runtime-config-preset.html#GUC-IN-HOT-STANDBY"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["hot_standby","max_standby_streaming_delay","hot_standby_feedback","primary_conninfo","block_size","data_checksums"],"summary":"in_hot_standby shows whether hot standby is currently active. It is read-only metadata in PG14–18, not a runtime tuning control."},"enumvals":[],"first_version":"14","group":"Preset Options","group_slug":"preset","imported_at":"2026-09-27T17:57:31.395646+08:00","intro_commit":{"authored_at":"2021-01-05T16:18:01-05:00","discussion":["https://postgr.es/m/CAF3+xM+8-ztOkaV9gHiJ3wfgENTq97QcjXQt+rbFQ6F7oNzt9A@mail.gmail.com"],"hash":"bf8a662c9afad6fd07b42cdc5e71416c51f75d31","subject":"Introduce a new GUC_REPORT setting \"in_hot_standby\".","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=bf8a662c9afad6fd07b42cdc5e71416c51f75d31"},"key":"in_hot_standby","last_version":"20","max_val":"","min_val":"","name":"in_hot_standby","position":179,"present_in":["14","15","16","17","18","19","20"],"short_desc":"Reports whether the server is currently in hot standby mode.","short_desc_zh":"","source_rev":"english-manuals:f669a6a9ba86c93f869cd8dadff2496515531a0a88f4984a19bd0f5468d99fd8","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"in_hot_standby","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"in_hot_standby","SourceRevision":"english-manuals:f669a6a9ba86c93f869cd8dadff2496515531a0a88f4984a19bd0f5468d99fd8","Facts":{"boot_val":"off","category":"Preset Options","context":"internal","description":"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.","doc":{"anchor":"GUC-IN-HOT-STANDBY","file":"runtime-config-preset.html","lang":"en","sha256":"4dbfec727b9cee838adefb8a766217748d91ab90190b452a58cec737459582ce","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"in_hot_standby","short_desc":"Shows whether hot standby is currently active.","source":"pg-settings-source-snapshot","unit":null,"vartype":"bool"},"ManualEvidence":{"doc":{"anchor":"GUC-IN-HOT-STANDBY","file":"runtime-config-preset.html","lang":"en","sha256":"4dbfec727b9cee838adefb8a766217748d91ab90190b452a58cec737459582ce","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"in_hot_standby","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"in_hot_standby","Summary":"","BodyHTML":"\u003cp\u003e报告服务器当前是否处于热备模式。当此值为 \u003ccode\u003eon\u003c/code\u003e 时，所有事务都被强制为只读。在会话中，此值只有在服务器被提升为主库时才会改变。更多信息参见\u003ca href=\"/docs/18/hot-standby.html\" rel=\"nofollow\"\u003e第 26.4 节\u003c/a\u003e。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"d3e4651534a4f2a0db8e2277d95d85e70195dc3d2077d704e90b8716f4c99ae5","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e报告服务器当前是否处于热备模式。当此值为 \u003ccode class=\"literal\"\u003eon\u003c/code\u003e 时，所有事务都被强制为只读。在会话中，此值只有在服务器被提升为主库时才会改变。更多信息参见\u003ca href=\"/docs/18/hot-standby.html\" title=\"26.4. 热备\"\u003e第 26.4 节\u003c/a\u003e。\u003c/p\u003e","doc_same_as":""}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
