Re: Disabling vacuum truncate for autovacuum

Fujii Masao <masao.fujii@oss.nttdata.com>

From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Gurjeet Singh <gurjeet@singh.im>, Robert Haas <robertmhaas@gmail.com>, Laurenz Albe <laurenz.albe@cybertec.at>, Postgres Hackers <pgsql-hackers@postgresql.org>, Will Storey <will@summercat.com>
Date: 2025-03-15T13:59:59Z
Lists: pgsql-hackers, pgsql-general

On 2025/03/15 0:42, Nathan Bossart wrote:
> I should also mention that we just have a few weeks left in the v18
> development cycle.  The code itself seems pretty straightforward, so if we
> can agree on behavior and nomenclature, I'll do my darndest to get this
> responsibly committed in time.

+1

Here are two minor review comments from me.

+      <varlistentry id="guc-vacuum-truncate" xreflabel="autovacuum">

This xreflabel should be "vacuum_truncate", not "autovacuum".


-      lock on the table. The <literal>TRUNCATE</literal> parameter
-      of <link linkend="sql-vacuum"><command>VACUUM</command></link>, if specified, overrides the value
-      of this option.
+      Per-table value for <xref linkend="guc-vacuum-truncate"/> parameter.

It was explicitly documented that the TRUNCATE option in the VACUUM
command overrides the vacuum_truncate reloption, but this information
has been removed in the patch. Shouldn't we keep it to clarify
the priority of these settings?

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION




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.