From dd3ae378301f7e84c18f7a90f183c3cd4165c0da Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 15 Oct 2025 14:31:12 +0200 Subject: Add log_autoanalyze_min_duration The log output functionality of log_autovacuum_min_duration applies to both VACUUM and ANALYZE, so it is not possible to separate the VACUUM and ANALYZE log output thresholds. Logs are likely to be output only for VACUUM and not for ANALYZE. Therefore, we decided to separate the threshold for log output of VACUUM by autovacuum (log_autovacuum_min_duration) and the threshold for log output of ANALYZE by autovacuum (log_autoanalyze_min_duration). Author: Shinya Kato Reviewed-by: Kasahara Tatsuhito Discussion: https://www.postgresql.org/message-id/flat/CAOzEurQtfV4MxJiWT-XDnimEeZAY+rgzVSLe8YsyEKhZcajzSA@mail.gmail.com --- src/backend/utils/misc/guc_parameters.dat | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/backend/utils/misc/guc_parameters.dat') diff --git a/src/backend/utils/misc/guc_parameters.dat b/src/backend/utils/misc/guc_parameters.dat index b176d5130e4..d6fc8333850 100644 --- a/src/backend/utils/misc/guc_parameters.dat +++ b/src/backend/utils/misc/guc_parameters.dat @@ -1771,8 +1771,8 @@ }, { name => 'log_autovacuum_min_duration', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT', - short_desc => 'Sets the minimum execution time above which autovacuum actions will be logged.', - long_desc => '-1 disables logging autovacuum actions. 0 means log all autovacuum actions.', + short_desc => 'Sets the minimum execution time above which vacuum actions by autovacuum will be logged.', + long_desc => '-1 disables logging vacuum actions by autovacuum. 0 means log all vacuum actions by autovacuum.', flags => 'GUC_UNIT_MS', variable => 'Log_autovacuum_min_duration', boot_val => '600000', @@ -1780,6 +1780,16 @@ max => 'INT_MAX', }, +{ name => 'log_autoanalyze_min_duration', type => 'int', context => 'PGC_SIGHUP', group => 'LOGGING_WHAT', + short_desc => 'Sets the minimum execution time above which analyze actions by autovacuum will be logged.', + long_desc => '-1 disables logging analyze actions by autovacuum. 0 means log all analyze actions by autovacuum.', + flags => 'GUC_UNIT_MS', + variable => 'Log_autoanalyze_min_duration', + boot_val => '600000', + min => '-1', + max => 'INT_MAX', +}, + { name => 'log_parameter_max_length', type => 'int', context => 'PGC_SUSET', group => 'LOGGING_WHAT', short_desc => 'Sets the maximum length in bytes of data logged for bind parameter values when logging statements.', long_desc => '-1 means log values in full.', -- cgit v1.2.3