{"Entry":{"collection":"guc","key":"autovacuum_naptime","name":"autovacuum_naptime","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Vacuuming / Automatic Vacuuming","category_zh":"","changed_in":["18"],"changes":[{"documentation_changed":false,"fields":{},"from":"8.0","status":"added","to":"8.1"},{"documentation_changed":true,"fields":{},"from":"8.1","status":"changed","to":"8.2"},{"documentation_changed":true,"fields":{},"from":"8.2","status":"changed","to":"8.3"},{"documentation_changed":true,"fields":{},"from":"8.4","status":"changed","to":"9.0"},{"documentation_changed":true,"fields":{},"from":"11","status":"changed","to":"12"},{"documentation_changed":false,"fields":{"category":{"from":"Autovacuum","to":"Vacuuming / Automatic Vacuuming"}},"from":"17","status":"changed","to":"18"}],"content_hash":"f73c962e1073a8186477130aecf660473f1336ae09bed8f39354a29634734077","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"1 min"}],"derived_content_hash":"5a4cb645c5d4aa2df1ff9095a20119b701ffe4ea7f089f29d8223c6c089dbf41","documentation_refresh":{"batch":"20261113","original_source_rev":"wiki-repair-20261023:583eecafdf1ee99f402224887bfd421997bc16d874e24c7c8302c2216dcec61b","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"editorial":{"advice":{"olap":"Run explicit ANALYZE/VACUUM after bulk loads instead of waiting only for proportional triggers; plan freezing and visibility-map advancement separately for append-only partitions.","oltp":"Tune autovacuum_naptime from table size, change rate, and maintenance SLA, using per-table thresholds for large/hot relations. Observe trigger intervals, dead tuples, and ANALYZE/VACUUM duration.","small":"Start with upstream. Fixed thresholds dominate on small tables; after changes, confirm worker and I/O headroom."},"mechanism":["Time to sleep between autovacuum runs. A configuration reload applies a new value; existing work already in flight is not retroactively changed.","The launcher aims to start work in each database once per interval; with N databases, launch attempts are spread at roughly naptime/N. It is not a fixed per-table polling period, and worker availability plus long-running jobs can add delay.","Monitor and change autovacuum_naptime together with autovacuum, autovacuum_max_workers, autovacuum_worker_slots. Validate on the relevant server role and real workload, then use its sighup context to choose session change, reload, or restart; a historical boot default is not the current effective value."],"pitfalls":["Changing the global value while a table storage parameter overrides it.","Treating reltuples and cumulative change statistics as exact real-time counts.","Blaming a threshold without checking long transactions, replication slots, and worker saturation.","Buying short-term quiet by deferring maintenance until wraparound failsafe activates."],"references":[{"title":"PostgreSQL 19 Beta 4: autovacuum_naptime","url":"https://www.postgresql.org/docs/19/runtime-config-vacuum.html#GUC-AUTOVACUUM-NAPTIME"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["autovacuum","autovacuum_max_workers","autovacuum_worker_slots","autovacuum_work_mem","track_counts","autovacuum_analyze_scale_factor"],"summary":"autovacuum_naptime — Time to sleep between autovacuum runs. Observed in PG9.0–19 Beta 4; its last measured boot default is 1 min in PG19 Beta 4, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"8.1","group":"Vacuuming","group_slug":"vacuum","imported_at":"2026-09-27T17:57:30.812793+08:00","intro_commit":{},"key":"autovacuum_naptime","last_version":"20","max_val":"","min_val":"","name":"autovacuum_naptime","position":26,"present_in":["8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"english-manuals:b8c8f1360b8e0e0531ce42549b0c1fc6b7d0bbb42c31d1fdb425708edca571b6","receipt_sha256":"dc0a7eb86c593f5aa8b005cab505820864c7930d49f8afbba462d8859eef2774","repair":"wiki-repair-20261023"},"short_desc":"Specifies the minimum delay between autovacuum runs on any given database.","short_desc_zh":"","source_rev":"wiki-repair-20261023:583eecafdf1ee99f402224887bfd421997bc16d874e24c7c8302c2216dcec61b","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"autovacuum_naptime","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"autovacuum_naptime","SourceRevision":"wiki-repair-20261023:583eecafdf1ee99f402224887bfd421997bc16d874e24c7c8302c2216dcec61b","Facts":{"boot_val":"60","category":"Vacuuming / Automatic Vacuuming","context":"sighup","description":"Specifies the minimum delay between autovacuum runs on any given database. In each round the daemon examines the database and issues VACUUM and ANALYZE commands as needed for tables in that database. If this value is specified without units, it is taken as seconds. The default is one minute (1min). This parameter can only be set in the postgresql.conf file or on the server command line.","description_zh":"指定自动清理在任意给定数据库上各次运行之间的最小间隔。在每一轮中后台进程检查数据库并根据需要为数据库中的表发出 VACUUM 和 ANALYZE 命令。如果指定值时没有单位，则以秒为单位。默认值为 1 分钟（1min）。该参数只能在 postgresql.conf 文件或在服务器命令行上设置。","description_zh_html":"\u003cp\u003e\n        指定自动清理在任意给定数据库上各次运行之间的最小间隔。在每一轮中后台进程检查数据库并根据需要为数据库中的表发出 \u003ccode class=\"command\"\u003eVACUUM\u003c/code\u003e 和 \u003ccode class=\"command\"\u003eANALYZE\u003c/code\u003e 命令。如果指定值时没有单位，则以秒为单位。默认值为 1 分钟（\u003ccode class=\"literal\"\u003e1min\u003c/code\u003e）。该参数只能在 \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e 文件或在服务器命令行上设置。\n       \u003c/p\u003e","doc":{"anchor":"GUC-AUTOVACUUM-NAPTIME","file":"runtime-config-vacuum.html","lang":"en","sha256":"599d3819c5fa60f160ba633df604ee9afd85549ffad2ae2fb0c3132a00d47417","slug":"18"},"doc_html":"\u003cp\u003e\n         Specifies the minimum delay between autovacuum runs on any given\n         database.  In each round the daemon examines the\n         database and issues \u003ccode class=\"command\"\u003eVACUUM\u003c/code\u003e and \u003ccode class=\"command\"\u003eANALYZE\u003c/code\u003e commands\n         as needed for tables in that database.\n         If this value is specified without units, it is taken as seconds.\n         The default is one minute (\u003ccode class=\"literal\"\u003e1min\u003c/code\u003e).\n         This parameter can only be set in the \u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e\n         file or on the server command line.\n        \u003c/p\u003e","doc_same_as":"","documentation_revision":{"inputs":[{"file":"runtime-config-vacuum.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"599d3819c5fa60f160ba633df604ee9afd85549ffad2ae2fb0c3132a00d47417","version":"18.7"},{"file":"runtime-config-vacuum.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"b835e4b6c446cfdaf673750aba29ba28fc55ef6cc0c531558c1e394fdc05a140","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":"2147483","metadata_version":"18","min_val":"1","name":"autovacuum_naptime","short_desc":"Time to sleep between autovacuum runs.","source":"pg-settings-source-snapshot","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/runtime-config-vacuum.html","sha256":"ea621aa6ed500fc56d21868a21fd313872cec24b86caf4c8f9bdfdc804b8235f"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"unit":"s","vartype":"integer","zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"GUC-AUTOVACUUM-NAPTIME","file":"runtime-config-vacuum.html","lang":"en","sha256":"599d3819c5fa60f160ba633df604ee9afd85549ffad2ae2fb0c3132a00d47417","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"autovacuum_naptime","SourceDatabase":"center","Version":"18","Locale":"en","Title":"autovacuum_naptime","Summary":"Specifies the minimum delay between autovacuum runs on any given database. In each round the daemon examines the database and issues VACUUM and ANALYZE commands as needed for tables in that database. If this value is specified without units, it is taken as seconds. The default is one minute (1min). This parameter can only be set in the postgresql.conf file or on the server command line.","BodyHTML":"\u003cp\u003e\n         Specifies the minimum delay between autovacuum runs on any given\n         database.  In each round the daemon examines the\n         database and issues \u003ccode\u003eVACUUM\u003c/code\u003e and \u003ccode\u003eANALYZE\u003c/code\u003e commands\n         as needed for tables in that database.\n         If this value is specified without units, it is taken as seconds.\n         The default is one minute (\u003ccode\u003e1min\u003c/code\u003e).\n         This parameter can only be set in the \u003ccode\u003epostgresql.conf\u003c/code\u003e\n         file or on the server command line.\n        \u003c/p\u003e","SourceRevision":"wiki-repair-20261023:583eecafdf1ee99f402224887bfd421997bc16d874e24c7c8302c2216dcec61b","ContentHash":"28b1e58f59c73035d1aa751e181aa3acc857271a70d28070ed2e3fc1a562118a","Payload":{"description":"Specifies the minimum delay between autovacuum runs on any given database. In each round the daemon examines the database and issues VACUUM and ANALYZE commands as needed for tables in that database. If this value is specified without units, it is taken as seconds. The default is one minute (1min). This parameter can only be set in the postgresql.conf file or on the server command line."}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
