{"Entry":{"collection":"guc","key":"effective_wal_level","name":"effective_wal_level","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Preset Options","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"18","status":"added","to":"19"}],"content_hash":"4c262d90c92d16b23ccf5a71731248f2d32d1b1e08b9dbbf6f20c6ca40e394c1","context":"","default_changed_in":[],"default_history":[{"from":"19","to":"19","value":"replica"}],"editorial":{"advice":{"olap":"Evaluate the setting with representative long-running and batch work. Measure total runtime, resource use, log volume, and failure behavior across the whole job rather than one isolated operation.","oltp":"Keep the upstream default until a reproducible operational need is demonstrated. Test under representative concurrency and inspect logs, latency, and the related settings before changing cluster-wide policy.","small":"Minimize overrides and document rollback. A small system has less room for extra logging, workers, memory, or retained WAL, so validate the change with explicit resource limits."},"mechanism":["PostgreSQL describes effective_wal_level as follows: “Shows effective WAL level.” It is read-only state reported by PostgreSQL, not an operator-controlled tuning knob. The atlas measures it in PG19 Beta 3; boot_val is the compiled or initialized baseline, not proof of a running cluster's effective setting.","Unlike configured wal_level, this read-only value reports the operational logging level. PostgreSQL 19 can maintain logical-equivalent WAL when logical slots require it even if wal_level is replica, and a standby inherits the effective value from the most upstream server in its replication chain.","Read it together with wal_level, max_replication_slots, max_wal_senders, track_commit_timestamp. Check SHOW and pg_settings on the target server, verify the source and pending_restart fields, and compare workload, logs, and resource metrics before and after any change."],"pitfalls":["Treating the measured boot_val for effective_wal_level as proof of the effective value on an initialized or managed cluster.","Applying a change as though it were immediate while pg_settings reports internal context.","Changing this setting in isolation without checking the linked limits, observability, and rollback path.","Depending on beta behavior in production without retesting the PostgreSQL 19 final release."],"references":[{"title":"PostgreSQL 19 Beta 4: effective_wal_level","url":"https://www.postgresql.org/docs/19/runtime-config-preset.html#GUC-EFFECTIVE-WAL-LEVEL"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["wal_level","max_replication_slots","max_wal_senders","track_commit_timestamp"],"summary":"effective_wal_level — Shows effective WAL level. Observed in PG19 Beta 4; its last measured boot default is replica in PG19 Beta 4, with internal context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"19","group":"Preset Options","group_slug":"preset","imported_at":"2026-09-27T17:57:31.163652+08:00","intro_commit":{"authored_at":"2025-12-23T10:13:16-08:00","discussion":["https://postgr.es/m/CAD21AoCVLeLYq09pQPaWs+Jwdni5FuJ8v2jgq-u9_uFbcp6UbA@mail.gmail.com"],"hash":"67c20979ce72b8c236622e5603f9775968ff501c","subject":"Toggle logical decoding dynamically based on logical slot presence.","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=67c20979ce72b8c236622e5603f9775968ff501c"},"key":"effective_wal_level","last_version":"20","max_val":"","min_val":"","name":"effective_wal_level","position":111,"present_in":["19","20"],"short_desc":"Reports the actual WAL logging level currently in effect in the system.","short_desc_zh":"","source_rev":"english-manuals:73e7002b64008a59322d17cd1bdbea9e11f8664727877f692b55e4627766411c","unit":"","vartype":"enum"}},"Definition":{"Collection":"guc","Key":"effective_wal_level","SourceDatabase":"center","Version":"20","SourceTable":"guc","SourceKey":"effective_wal_level","SourceRevision":"english-manuals:73e7002b64008a59322d17cd1bdbea9e11f8664727877f692b55e4627766411c","Facts":{"boot_val":null,"category":"Preset Options","context":"","description":"Reports the actual WAL logging level currently in effect in the system. This parameter shares the same set of values as wal_level, but reflects the operational WAL level rather than the configured setting. For descriptions of possible values, refer to the wal_level parameter documentation. The effective WAL level can differ from the configured wal_level in certain situations. For example, when wal_level is set to replica and the system has one or more logical replication slots, effective_wal_level will show logical to indicate that the system is maintaining WAL records at logical level equivalent. On standby servers, effective_wal_level matches the value of effective_wal_level from the most upstream server in the replication chain.","doc":{"anchor":"GUC-EFFECTIVE-WAL-LEVEL","file":"runtime-config-preset.html","lang":"en","sha256":"3eafee05354cf7bfc4550aac26646e5608d9ef531a3f66e3d0db4076a99d5b81","slug":"devel"},"documented":true,"enumvals":[],"extra_desc":"","lang":"en","max_val":null,"metadata_version":"","min_val":null,"name":"effective_wal_level","short_desc":"","source":"english-manual","unit":"","vartype":"enum"},"ManualEvidence":{"doc":{"anchor":"GUC-EFFECTIVE-WAL-LEVEL","file":"runtime-config-preset.html","lang":"en","sha256":"3eafee05354cf7bfc4550aac26646e5608d9ef531a3f66e3d0db4076a99d5b81","slug":"devel"}},"MeasuredEvidence":{"metadata_version":""}},"Text":{"Collection":"guc","Key":"effective_wal_level","SourceDatabase":"pgweb","Version":"20","Locale":"zh-Hans","Title":"effective_wal_level","Summary":"","BodyHTML":"\u003cp\u003e报告当前系统中实际生效的 WAL 记录级别。此参数与\u003ca href=\"/docs/devel/runtime-config-wal.html#GUC-WAL-LEVEL\" rel=\"nofollow\"\u003ewal_level\u003c/a\u003e共享同一组取值，但反映的是运行中的 WAL 级别，而非配置值。各可能取值的说明请参见\u003ccode\u003ewal_level\u003c/code\u003e参数文档。\u003c/p\u003e\u003cp\u003e实际生效的 WAL 级别在某些情况下可能与配置的\u003ccode\u003ewal_level\u003c/code\u003e不同。例如，当\u003ccode\u003ewal_level\u003c/code\u003e设置为\u003ccode\u003ereplica\u003c/code\u003e且系统中有一个或多个逻辑复制槽时，\u003ccode\u003eeffective_wal_level\u003c/code\u003e会显示为\u003ccode\u003elogical\u003c/code\u003e，表示系统正在以等同于\u003ccode\u003elogical\u003c/code\u003e级别的方式维护 WAL 记录。\u003c/p\u003e\u003cp\u003e在备库服务器上，\u003ccode\u003eeffective_wal_level\u003c/code\u003e与复制链中最上游服务器的\u003ccode\u003eeffective_wal_level\u003c/code\u003e值一致。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"a715397c7d96ea36879b142b0d475a1fc88eb7e5ea99b630f39b5040637704ee","Payload":{"carried_from":"19","carry_reason":"手册不含 pg_settings 事实，沿用 19","doc_html":"\u003cp\u003e报告当前系统中实际生效的 WAL 记录级别。此参数与\u003ca href=\"/docs/devel/runtime-config-wal.html#GUC-WAL-LEVEL\"\u003ewal_level\u003c/a\u003e共享同一组取值，但反映的是运行中的 WAL 级别，而非配置值。各可能取值的说明请参见\u003ccode class=\"varname\"\u003ewal_level\u003c/code\u003e参数文档。\u003c/p\u003e\u003cp\u003e实际生效的 WAL 级别在某些情况下可能与配置的\u003ccode class=\"varname\"\u003ewal_level\u003c/code\u003e不同。例如，当\u003ccode class=\"varname\"\u003ewal_level\u003c/code\u003e设置为\u003ccode class=\"literal\"\u003ereplica\u003c/code\u003e且系统中有一个或多个逻辑复制槽时，\u003ccode class=\"varname\"\u003eeffective_wal_level\u003c/code\u003e会显示为\u003ccode class=\"literal\"\u003elogical\u003c/code\u003e，表示系统正在以等同于\u003ccode class=\"literal\"\u003elogical\u003c/code\u003e级别的方式维护 WAL 记录。\u003c/p\u003e\u003cp\u003e在备库服务器上，\u003ccode class=\"varname\"\u003eeffective_wal_level\u003c/code\u003e与复制链中最上游服务器的\u003ccode class=\"varname\"\u003eeffective_wal_level\u003c/code\u003e值一致。\u003c/p\u003e","doc_same_as":""}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
