{"Entry":{"collection":"guc","key":"wal_skip_threshold","name":"wal_skip_threshold","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Write-Ahead Log / Settings","category_zh":"","changed_in":["14"],"changes":[{"documentation_changed":false,"fields":{},"from":"12","status":"added","to":"13"},{"documentation_changed":false,"fields":{"short_desc":{"from":"Size of new file to fsync instead of writing WAL.","to":"Minimum size of new file to fsync instead of writing WAL."}},"from":"13","status":"changed","to":"14"}],"content_hash":"517c6bc156aa9402b9d35ae58892c8d0b7ee6a348f6268fd734af7742b5bf190","context":"","default_changed_in":[],"default_history":[{"from":"13","to":"19","value":"2 MiB"}],"editorial":{"advice":{"olap":"Provision WAL, archive bandwidth, and recovery I/O for bulk-load peaks. Coordinate load pacing and checkpoints when reducing spikes; never break the recovery chain for throughput.","oltp":"Establish durability and recovery objectives first, then tune wal_skip_threshold from WAL rate, flush latency, checkpoints, and peak pg_wal usage. Validate every change with crash/recovery and archive monitoring.","small":"Start from safe defaults and set explicit alerts for limited disk capacity. Do not disable durability or break the recovery chain merely to save modest I/O."},"mechanism":["Minimum size of new file to fsync instead of writing WAL. It can be changed at session scope, so different sessions may observe different behavior.","Only at wal_level=minimal, creating or rewriting a permanent relation can either WAL-log its new data or fsync the files directly. This threshold chooses fsync for larger relations and has no effect at replica or logical levels.","Monitor and change wal_skip_threshold together with commit_delay, commit_siblings, fsync. Validate on the relevant server role and real workload, then use its user context to choose session change, reload, or restart; a historical boot default is not the current effective value."],"pitfalls":["Tuning it at wal_level=replica or logical, where the setting has no effect.","Applying it to ordinary row changes even though it concerns newly created or rewritten relation files.","Reading an unqualified value as bytes instead of kilobytes.","Choosing fsync versus WAL logging without benchmarking the actual storage and concurrent-commit impact."],"references":[{"title":"PostgreSQL 19 Beta 4: wal_skip_threshold","url":"https://www.postgresql.org/docs/19/runtime-config-wal.html#GUC-WAL-SKIP-THRESHOLD"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["commit_delay","commit_siblings","fsync","full_page_writes","synchronous_commit","wal_buffers"],"summary":"wal_skip_threshold sets the minimum size of new file to fsync instead of writing WAL. It is a user setting present in PG13–18; the latest recorded boot default is 2 MiB."},"enumvals":[],"first_version":"13","group":"Write-Ahead Log","group_slug":"wal","imported_at":"2026-09-27T17:57:32.373394+08:00","intro_commit":{"authored_at":"2020-03-21T09:38:26-07:00","discussion":["https://postgr.es/m/20150702220524.GA9392@svana.org"],"hash":"cb2fd7eac285b1b0a24eeb2b8ed4456b66c5a09f","subject":"Skip WAL for new relfilenodes, under wal_level=minimal.","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=cb2fd7eac285b1b0a24eeb2b8ed4456b66c5a09f"},"key":"wal_skip_threshold","last_version":"20","max_val":"","min_val":"","name":"wal_skip_threshold","position":482,"present_in":["13","14","15","16","17","18","19","20"],"short_desc":"When wal_level is minimal and a transaction commits after creating or rewriting a permanent relation, this setting determines how to persist the new data.","short_desc_zh":"","source_rev":"english-manuals:22845f38f23d5b63d8aa7b50933c3aa02a4a98dd1ff1464c6313d3c0150aba44","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"wal_skip_threshold","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"wal_skip_threshold","SourceRevision":"english-manuals:22845f38f23d5b63d8aa7b50933c3aa02a4a98dd1ff1464c6313d3c0150aba44","Facts":{"boot_val":"2048","category":"Write-Ahead Log / Settings","context":"user","description":"When wal_level is minimal and a transaction commits after creating or rewriting a permanent relation, this setting determines how to persist the new data. If the data is smaller than this setting, write it to the WAL log; otherwise, use an fsync of affected files. Depending on the properties of your storage, raising or lowering this value might help if such commits are slowing concurrent transactions. If this value is specified without units, it is taken as kilobytes. The default is two megabytes (2MB).","doc":{"anchor":"GUC-WAL-SKIP-THRESHOLD","file":"runtime-config-wal.html","lang":"en","sha256":"d2646404a06e8f7ac655204b4f28c049ae8f3fd4f2272db080fcefa2c4af0763","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":"2147483647","metadata_version":"18","min_val":"0","name":"wal_skip_threshold","short_desc":"Minimum size of new file to fsync instead of writing WAL.","source":"pg-settings-source-snapshot","unit":"kB","vartype":"integer"},"ManualEvidence":{"doc":{"anchor":"GUC-WAL-SKIP-THRESHOLD","file":"runtime-config-wal.html","lang":"en","sha256":"d2646404a06e8f7ac655204b4f28c049ae8f3fd4f2272db080fcefa2c4af0763","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"wal_skip_threshold","SourceDatabase":"center","Version":"18","Locale":"en","Title":"wal_skip_threshold","Summary":"When wal_level is minimal and a transaction commits after creating or rewriting a permanent relation, this setting determines how to persist the new data. If the data is smaller than this setting, write it to the WAL log; otherwise, use an fsync of affected files. Depending on the properties of your storage, raising or lowering this value might help if such commits are slowing concurrent transactions. If this value is specified without units, it is taken as kilobytes. The default is two megabytes (2MB).","BodyHTML":"\u003cp\u003eWhen wal_level is minimal and a transaction commits after creating or rewriting a permanent relation, this setting determines how to persist the new data. If the data is smaller than this setting, write it to the WAL log; otherwise, use an fsync of affected files. Depending on the properties of your storage, raising or lowering this value might help if such commits are slowing concurrent transactions. If this value is specified without units, it is taken as kilobytes. The default is two megabytes (2MB).\u003c/p\u003e","SourceRevision":"english-manuals:22845f38f23d5b63d8aa7b50933c3aa02a4a98dd1ff1464c6313d3c0150aba44","ContentHash":"0e041ab3f8efd1f4f1e72c07860000b0a8babeea272df4900b7056b0e406607b","Payload":{"description":"When wal_level is minimal and a transaction commits after creating or rewriting a permanent relation, this setting determines how to persist the new data. If the data is smaller than this setting, write it to the WAL log; otherwise, use an fsync of affected files. Depending on the properties of your storage, raising or lowering this value might help if such commits are slowing concurrent transactions. If this value is specified without units, it is taken as kilobytes. The default is two megabytes (2MB)."}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["13","14","15","16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
