{"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"}],"derived_content_hash":"10269d167c467286336aed34266793ed360dd1e2a4e7979beb28e505873df025","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"],"repair_provenance":{"original_source_revision":"english-manuals:f669a6a9ba86c93f869cd8dadff2496515531a0a88f4984a19bd0f5468d99fd8","receipt_sha256":"e77795698691247512c85f821f32e6a1a9896acf90c41b46c3d89b1cad3e54e9","repair":"wiki-repair-20261023"},"short_desc":"Reports whether the server is currently in hot standby mode.","short_desc_zh":"","source_rev":"wiki-repair-20261023:379c7b42502ea08c4f1a72630d5a4bba969ad7fd578d09ead7ce7659e9eba3d0","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"in_hot_standby","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"in_hot_standby","SourceRevision":"wiki-repair-20261023:379c7b42502ea08c4f1a72630d5a4bba969ad7fd578d09ead7ce7659e9eba3d0","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.","description_zh":"报告服务器当前是否处于热备模式。当此值为 on 时，所有事务都被强制为只读。在会话中，此值只有在服务器被提升为主库时才会改变。更多信息参见第 26.4 节。","description_zh_html":"\u003cp\u003e\n        报告服务器当前是否处于热备模式。当此值为 \u003ccode class=\"literal\"\u003eon\u003c/code\u003e 时，所有事务都被强制为只读。在会话中，此值只有在服务器被提升为主库时才会改变。更多信息参见\u003ca class=\"xref\" href=\"/zh/docs/18/hot-standby.html\" title=\"26.4. 热备\"\u003e第 26.4 节\u003c/a\u003e。\n       \u003c/p\u003e","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","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/runtime-config-preset.html","sha256":"d0e95b9a81d5fdf853df26eba7dc096d96b9b45dadda13e0d0353aa72ac7a7b9"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"unit":null,"vartype":"bool","zh_from":"same-version-pgdoc"},"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":"center","Version":"18","Locale":"en","Title":"in_hot_standby","Summary":"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.","BodyHTML":"\u003cp\u003eReports 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.\u003c/p\u003e","SourceRevision":"wiki-repair-20261023:379c7b42502ea08c4f1a72630d5a4bba969ad7fd578d09ead7ce7659e9eba3d0","ContentHash":"a101f4b5c6a419fc070c010ec3df6989bfc715974fab9254aefca909ecee2e31","Payload":{"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."}},"RequestedLocale":"en","Fallback":false,"Versions":["14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
