diff options
| author | Peter Eisentraut <peter@eisentraut.org> | 2025-10-15 14:31:12 +0200 |
|---|---|---|
| committer | Peter Eisentraut <peter@eisentraut.org> | 2025-10-15 14:31:12 +0200 |
| commit | dd3ae378301f7e84c18f7a90f183c3cd4165c0da (patch) | |
| tree | 6de83d42ae4be0d0d1c29ed6255cd48e7809cdbc /src/backend/access/common | |
| parent | 12609fbacb007698ec91101b6464436506518346 (diff) | |
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 <shinya11.kato@gmail.com>
Reviewed-by: Kasahara Tatsuhito <kasaharatt@oss.nttdata.com>
Discussion: https://www.postgresql.org/message-id/flat/CAOzEurQtfV4MxJiWT-XDnimEeZAY+rgzVSLe8YsyEKhZcajzSA@mail.gmail.com
Diffstat (limited to 'src/backend/access/common')
| -rw-r--r-- | src/backend/access/common/reloptions.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c index 35150bf237b..9e288dfecbf 100644 --- a/src/backend/access/common/reloptions.c +++ b/src/backend/access/common/reloptions.c @@ -322,7 +322,7 @@ static relopt_int intRelOpts[] = { { "log_autovacuum_min_duration", - "Sets the minimum execution time above which autovacuum actions will be logged", + "Sets the minimum execution time above which vacuum actions by autovacuum will be logged", RELOPT_KIND_HEAP | RELOPT_KIND_TOAST, ShareUpdateExclusiveLock }, @@ -330,6 +330,15 @@ static relopt_int intRelOpts[] = }, { { + "log_autoanalyze_min_duration", + "Sets the minimum execution time above which analyze actions by autovacuum will be logged", + RELOPT_KIND_HEAP, + ShareUpdateExclusiveLock + }, + -1, -1, INT_MAX + }, + { + { "toast_tuple_target", "Sets the target tuple length at which external columns will be toasted", RELOPT_KIND_HEAP, @@ -1895,7 +1904,9 @@ default_reloptions(Datum reloptions, bool validate, relopt_kind kind) {"autovacuum_multixact_freeze_table_age", RELOPT_TYPE_INT, offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, multixact_freeze_table_age)}, {"log_autovacuum_min_duration", RELOPT_TYPE_INT, - offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, log_min_duration)}, + offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, log_vacuum_min_duration)}, + {"log_autoanalyze_min_duration", RELOPT_TYPE_INT, + offsetof(StdRdOptions, autovacuum) + offsetof(AutoVacOpts, log_analyze_min_duration)}, {"toast_tuple_target", RELOPT_TYPE_INT, offsetof(StdRdOptions, toast_tuple_target)}, {"autovacuum_vacuum_cost_delay", RELOPT_TYPE_REAL, |
