Re: Track skipped tables during autovacuum and autoanalyze - Mailing list pgsql-hackers

From Yugo Nagata
Subject Re: Track skipped tables during autovacuum and autoanalyze
Date
Msg-id 20260327163549.b5df519c0099970ddbb3412d@sraoss.co.jp
Whole thread Raw
In response to Re: Track skipped tables during autovacuum and autoanalyze  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Track skipped tables during autovacuum and autoanalyze
List pgsql-hackers
On Fri, 27 Mar 2026 08:07:29 +0900
Michael Paquier <michael@paquier.xyz> wrote:

> On Thu, Mar 26, 2026 at 07:22:03PM +0900, Yugo Nagata wrote:
> > To handle the possibility that the table is dropped between
> > RangeVarGetRelid() and the lock attempt, SearchSysCacheExists1() is
> > used after acquiring the lock.
> 
> (Noticed while skimming through my emails this morning..)
> 
> +void
> +pgstat_report_skipped_vacuum_analyze(Oid relid, bool vacuum, bool analyze,
> +                                     bool autovacuum)
> 
> I'd recommend to replace this interface with three booleans with a set
> of three bitwise flags.  That would be less error prone for the
> callers of this function, or we could finish by aggregating counters
> we don't want to.

Thank you for the suggestion.
I've attached a revised patch reflecting this change, and it also includes
the documentation.

Regards,
Yugo Nagata

-- 
Yugo Nagata <nagata@sraoss.co.jp>

Attachment

pgsql-hackers by date:

Previous
From: Lukas Fittl
Date:
Subject: Re: Stack-based tracking of per-node WAL/buffer usage
Next
From: Peter Eisentraut
Date:
Subject: Re: Enable -Wstrict-prototypes and -Wold-style-definition by default