Re: Track skipped tables during autovacuum and autoanalyze

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
Cc: Sami Imseih <samimseih(at)gmail(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Track skipped tables during autovacuum and autoanalyze
Date: 2026-03-26 23:07:29
Message-ID: acW8MW-Gb8Aj_TH2@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2026-03-26 23:10:15 Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)
Previous Message Bharath Rupireddy 2026-03-26 23:05:40 Re: LockHasWaiters() crashes on fast-path locks