{"Entry":{"collection":"guc","key":"log_autoanalyze_min_duration","name":"log_autoanalyze_min_duration","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Reporting and Logging / What to Log","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"18","status":"added","to":"19"}],"content_hash":"8fc692347dd762bcc4ab91350a39c6d36f5fc954cc494a43ad656e9c24cd3231","context":"","default_changed_in":[],"default_history":[{"from":"19","to":"19","value":"10 min"}],"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 log_autoanalyze_min_duration as follows: “Sets the minimum execution time above which analyze actions by autovacuum will be logged.” A configuration reload applies the value to the server without a full restart. 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.","Zero logs every automatic ANALYZE, -1 disables these duration messages, and a positive value logs actions meeting the threshold plus relevant skips caused by locks or dropped relations. Per-table storage parameters can override it, independently from log_autovacuum_min_duration for VACUUM actions.","Read it together with log_autovacuum_min_duration, autovacuum, autovacuum_analyze_threshold, autovacuum_analyze_scale_factor. 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 log_autoanalyze_min_duration as proof of the effective value on an initialized or managed cluster.","Applying a change as though it were immediate while pg_settings reports sighup 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: log_autoanalyze_min_duration","url":"https://www.postgresql.org/docs/19/runtime-config-logging.html#GUC-LOG-AUTOANALYZE-MIN-DURATION"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["log_autovacuum_min_duration","autovacuum","autovacuum_analyze_threshold","autovacuum_analyze_scale_factor","log_min_messages"],"summary":"log_autoanalyze_min_duration — Sets the minimum execution time above which analyze actions by autovacuum will be logged. Observed in PG19 Beta 4; its last measured boot default is 10 min in PG19 Beta 4, with sighup context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"19","group":"Reporting and Logging","group_slug":"logging","imported_at":"2026-09-30T00:40:57.267991+08:00","intro_commit":{"authored_at":"2025-10-15T14:31:12+02:00","discussion":["https://www.postgresql.org/message-id/flat/CAOzEurQtfV4MxJiWT-XDnimEeZAY+rgzVSLe8YsyEKhZcajzSA@mail.gmail.com"],"hash":"dd3ae378301f7e84c18f7a90f183c3cd4165c0da","subject":"Add log_autoanalyze_min_duration","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=dd3ae378301f7e84c18f7a90f183c3cd4165c0da"},"key":"log_autoanalyze_min_duration","last_version":"20","max_val":"","min_val":"","name":"log_autoanalyze_min_duration","position":216,"present_in":["19","20"],"short_desc":"Causes analyze action executed by autovacuum to be logged if it ran for at least the specified amount of time.","short_desc_zh":"","source_rev":"english-manuals:9425247e167be47f1ddde54dca843c85c98056a1220b686a5b6a48fa28c58f4f","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"log_autoanalyze_min_duration","SourceDatabase":"center","Version":"20","SourceTable":"guc","SourceKey":"log_autoanalyze_min_duration","SourceRevision":"english-manuals:9425247e167be47f1ddde54dca843c85c98056a1220b686a5b6a48fa28c58f4f","Facts":{"boot_val":null,"category":"What to Log","context":"","description":"Causes analyze action executed by autovacuum to be logged if it ran for at least the specified amount of time. Setting this to zero logs all analyze actions by autovacuum. -1 disables logging analyze actions by autovacuum. If this value is specified without units, it is taken as milliseconds. For example, if you set this to 250ms then all automatic analyzes that run 250ms or longer will be logged. In addition, when this parameter is set to any value other than -1, a message will be logged if an analyze action by autovacuum is skipped due to a conflicting lock or a concurrently dropped relation. The default is 10min. Enabling this parameter can be helpful in tracking analyze activity by autovacuum. This parameter can only be set in the postgresql.conf file or on the server command line; but the setting can be overridden for individual tables by changing table storage parameters.","doc":{"anchor":"GUC-LOG-AUTOANALYZE-MIN-DURATION","file":"runtime-config-logging.html","lang":"en","sha256":"2a5d4075a753b17259ee33e4681fb5133d151fb4226c96ef69f1543e3ce473f4","slug":"devel"},"documented":true,"enumvals":[],"extra_desc":"","lang":"en","max_val":null,"metadata_version":"","min_val":null,"name":"log_autoanalyze_min_duration","short_desc":"","source":"english-manual","unit":"","vartype":"integer"},"ManualEvidence":{"doc":{"anchor":"GUC-LOG-AUTOANALYZE-MIN-DURATION","file":"runtime-config-logging.html","lang":"en","sha256":"2a5d4075a753b17259ee33e4681fb5133d151fb4226c96ef69f1543e3ce473f4","slug":"devel"}},"MeasuredEvidence":{"metadata_version":""}},"Text":{"Collection":"guc","Key":"log_autoanalyze_min_duration","SourceDatabase":"center","Version":"20","Locale":"en","Title":"log_autoanalyze_min_duration","Summary":"Causes analyze action executed by autovacuum to be logged if it ran for at least the specified amount of time. Setting this to zero logs all analyze actions by autovacuum. -1 disables logging analyze actions by autovacuum. If this value is specified without units, it is taken as milliseconds. For example, if you set this to 250ms then all automatic analyzes that run 250ms or longer will be logged. In addition, when this parameter is set to any value other than -1, a message will be logged if an analyze action by autovacuum is skipped due to a conflicting lock or a concurrently dropped relation. The default is 10min. Enabling this parameter can be helpful in tracking analyze activity by autovacuum. This parameter can only be set in the postgresql.conf file or on the server command line; but the setting can be overridden for individual tables by changing table storage parameters.","BodyHTML":"\u003cp\u003eCauses analyze action executed by autovacuum to be logged if it ran for at least the specified amount of time. Setting this to zero logs all analyze actions by autovacuum. -1 disables logging analyze actions by autovacuum. If this value is specified without units, it is taken as milliseconds. For example, if you set this to 250ms then all automatic analyzes that run 250ms or longer will be logged. In addition, when this parameter is set to any value other than -1, a message will be logged if an analyze action by autovacuum is skipped due to a conflicting lock or a concurrently dropped relation. The default is 10min. Enabling this parameter can be helpful in tracking analyze activity by autovacuum. This parameter can only be set in the postgresql.conf file or on the server command line; but the setting can be overridden for individual tables by changing table storage parameters.\u003c/p\u003e","SourceRevision":"english-manuals:9425247e167be47f1ddde54dca843c85c98056a1220b686a5b6a48fa28c58f4f","ContentHash":"ee963e5523c432367bacef4a82074cda9a5cf765f4b6919ffc037220bd7e7c9c","Payload":{"description":"Causes analyze action executed by autovacuum to be logged if it ran for at least the specified amount of time. Setting this to zero logs all analyze actions by autovacuum. -1 disables logging analyze actions by autovacuum. If this value is specified without units, it is taken as milliseconds. For example, if you set this to 250ms then all automatic analyzes that run 250ms or longer will be logged. In addition, when this parameter is set to any value other than -1, a message will be logged if an analyze action by autovacuum is skipped due to a conflicting lock or a concurrently dropped relation. The default is 10min. Enabling this parameter can be helpful in tracking analyze activity by autovacuum. This parameter can only be set in the postgresql.conf file or on the server command line; but the setting can be overridden for individual tables by changing table storage parameters."}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
