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

From Michael Paquier
Subject Re: Track skipped tables during autovacuum and autoanalyze
Date
Msg-id acW8MW-Gb8Aj_TH2@paquier.xyz
Whole thread Raw
In response to Re: Track skipped tables during autovacuum and autoanalyze  (Yugo Nagata <nagata@sraoss.co.jp>)
List pgsql-hackers
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.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: LockHasWaiters() crashes on fast-path locks
Next
From: David Rowley
Date:
Subject: Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)