Re: Add log_autovacuum_{vacuum|analyze}_min_duration

From: Shinya Kato <shinya11(dot)kato(at)gmail(dot)com>
To: kasaharatt <kasaharatt(at)oss(dot)nttdata(dot)com>
Cc: Sami Imseih <samimseih(at)gmail(dot)com>, 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-08-14 04:26:17
Message-ID: CAOzEurTkrbCROjwzMHi39batcEMFH_5PnX9K9U8mYoFjC1uWeQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Wed, Aug 13, 2025 at 5:44 PM kasaharatt <kasaharatt(at)oss(dot)nttdata(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.
> >>
> >>
> >> A new patch is attached.
> >> Thoughts?
> I reviewed this patch.
> I also have no particular objections to the Approach 2.

Thank you for the review!

> > + <term><literal>log_autoanalyze_min_duration</literal>,
> > <literal>toast.log_autoanalyze_min_duration</literal>(<type>integer</type>)
> (snip)
> > + "toast.log_autoanalyze_min_duration",
> This patch adds the log_autoanalyze_min_duration parameter fot TOAST
> tables.
> However since PostgreSQL currently does not support ANALYZE on TOAST
> tables,
> isn't this parameter unnecessary?

You're right; that was a mistake. I've fixed it in the v4 patch.

+log_autoanalyze_min_duration = 0

Additionally, I removed the above setting from the test files in
src/test/modules/xid_wraparound/t/ (001_emergency_vacuum.pl,
002_limits.pl, 003_wraparounds.pl). The reason is that these tests
check for autovacuum logs, not autoanalyze logs. You can run the test
with the following command:
make check -C src/test/modules/xid_wraparound PG_TEST_EXTRA='xid_wraparound'

--
Best regards,
Shinya Kato
NTT OSS Center

Attachment Content-Type Size
v4-0001-Add-log_autoanalyze_min_duration.patch application/octet-stream 19.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kirill Reshke 2025-08-14 05:41:50 Re: VM corruption on standby
Previous Message Fujii Masao 2025-08-14 04:12:47 Re: Excessive LOG messages from replication slot sync worker