Re: Remove unused at_sharedrel from autovac_table

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Yugo Nagata <nagata@sraoss.co.jp>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2026-03-25T08:02:19Z
Lists: pgsql-hackers
On Wed, Mar 25, 2026 at 04:57:34PM +0900, Yugo Nagata wrote:
> I've attached a trivial patch that removes at_sharedrel from autovac_table.
> This field was introduced in commit 15739393e4 to handle skipping of
> shared relations in autovacuum, but it has been unused since commit
> 38f7831d70.

Indeed, yes.  There is no need for it.
--
Michael

Commits

  1. Remove unused autovac_table.at_sharedrel

  2. Avoid holding AutovacuumScheduleLock while rechecking table statistics.

  3. Fix autovacuum for shared relations