Re: Track skipped tables during autovacuum and autoanalyze

From: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
To: Shinya Kato <shinya11(dot)kato(at)gmail(dot)com>
Cc: Sami Imseih <samimseih(at)gmail(dot)com>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: Track skipped tables during autovacuum and autoanalyze
Date: 2026-07-28 14:27:10
Message-ID: 20260728232710.a00f54d1136b788437b2eb7e@sraoss.co.jp
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 28 Jul 2026 23:14:32 +0900
Shinya Kato <shinya11(dot)kato(at)gmail(dot)com> wrote:

> On Sat, Jul 25, 2026 at 1:48 AM Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp> wrote:
>
> > I've attached the v12 patch, which incorporates Kato-san's feedback.
> >
> > Regarding the column names, I noticed the change from skipped_* to lock_skipped_*.
> > While I initially preferred skipped_*, I understand Kato-san's point considering
> > that there could be other reasons for skipping in the future.
>
> Thank you!
>
> > > > +{ oid => '8142', descr => 'statistics: last skipped vacuum time for a table',
> > > > + proname => 'pg_stat_get_last_lock_skipped_vacuum_time', provolatile => 's',
> > >
> > > The proname now says lock_skipped, but the descr still says just
> > > "skipped". I think the descr should mention the lock cause as well,
> > > and the same applies to the other seven entries.
> >
> > I changed them like:
> >
> > 'statistics: last vacuum skip time due to lock unavailability for a table'
> > 'statistics: number of vacuum skips due to lock unavailability for a table'
> >
> > How do these sound?
>
> These are well to me. One small thing about the analyze count entries:
>
> > +{ oid => '8148', descr => 'statistics: number of analyzes skips due to lock unavailability for a table',
>
> "analyzes skips" doubles the plural. Since "skips" is the noun here, I
> think "analyze skips" is better, matching "vacuum skips" in 8146. The
> same applies to 8149.

Thanks for pointing it out.
I've updated the patch to fix this.

Regards,
Yugo Nagata

--
Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>

Attachment Content-Type Size
v14-0002-Add-injection-point-test-for-vacuum-skip_locked-.patch text/x-diff 8.0 KB
v14-0001-Track-skipped-vacuum-and-analyze-activity-per-re.patch text/x-diff 43.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Matheus Alcantara 2026-07-28 14:27:50 Re: hashjoins vs. Bloom filters (yet again)
Previous Message Shinya Kato 2026-07-28 14:14:32 Re: Track skipped tables during autovacuum and autoanalyze