Re: Disabling vacuum truncate for autovacuum

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>, Robert Treat <rob@xzilla.net>, Laurenz Albe <laurenz.albe@cybertec.at>, Gurjeet Singh <gurjeet@singh.im>, Andres Freund <andres@anarazel.de>, Will Storey <will@summercat.com>, Robert Haas <robertmhaas@gmail.com>, Postgres Hackers <pgsql-hackers@postgresql.org>
Date: 2025-03-20T16:59:45Z
Lists: pgsql-hackers, pgsql-general
On Thu, Mar 20, 2025 at 8:18 AM Nathan Bossart <nathandbossart@gmail.com>
wrote:

> Committed.
>
>
We added isset_offset to the public struct to introduce this new general
behavior of tracking whether any table reloption has been set (not just
vacuum_truncate) without any comments.

I get the need for this kind of logic, since we used a boolean for the
table option, but as a self-proclaimed hack it seems worth more comments
than provided here.  Especially pertaining to whether this is indeed
generic or vacuum_truncate specific.  It's unclear since both isset and
vacuum_truncate_set have been introduced.  If it is now a general property
applying to any setting then vacuum_truncate_set shouldn't be needed - we
should just get the isset value of the existing vacuum_truncate reloption
by name.

David J.

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Expand comment for isset_offset.

  2. Add vacuum_truncate configuration parameter.