Re: Add log_autovacuum_{vacuum|analyze}_min_duration

From: Shinya Kato <shinya11(dot)kato(at)gmail(dot)com>
To: Sami Imseih <samimseih(at)gmail(dot)com>
Cc: wenhui qiu <qiuwenhuifx(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Michael Banck <mbanck(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Add log_autovacuum_{vacuum|analyze}_min_duration
Date: 2025-06-11 04:49:39
Message-ID: CAOzEurT0XxHW2g3TfnUfo=eNkiRMmPP1SaAS8wtDnmYxZxPVmA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 5, 2025 at 3:53 AM Sami Imseih <samimseih(at)gmail(dot)com> wrote:

> > Approach 2:
> > - log_autovacuum_min_duration: Changed behavior, which controls only
> > autovacuum logging.
> > - log_autoanalyze_min_duration: New parameter, which controls
> > autoanalyze logging.
>
> My vote is for this approach. It is probably OK to change the behavior of
> log_autovacuum_min_duration, as the new GUC will have the same default
> value.
>

Thank you for voting. I also think this approach is reasonable to implement.

log_autoanalyze_min_duration makes sense, especially since
> "autoanalyze" is the term we already use in system views (e.g.,
> pg_stat_all_tables.last_autoanalyze). I do not think we need to worry
> about consistency with other autovacuum parameters (e.g.,
> autovacuum_[vacuum|analyze]_threshold, etc.), because in this case we are
> only talking about logging, so we have more flexibility in naming.
>

+1.

> Initially, I was not sure if there is a use case in which someone would
> want
> to turn off autovacuum logging but keep autoanalyze logging (or vice
> versa),
> but there may be, and this will be more flexible.
>

My concern is less about turning autovacuum and autoanalyze logs on or off
individually, and more about the fact that setting a large value for
log_autovacuum_min_duration prevents autoanalyze logs from being recorded.

--
Best regards,
Shinya Kato
NTT OSS Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2025-06-11 04:52:40 Re: [PATCH] Re: Proposal to Enable/Disable Index using ALTER INDEX
Previous Message Zhijie Hou (Fujitsu) 2025-06-11 04:48:12 RE: failover logical replication slots