Re: Disabling vacuum truncate for autovacuum

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: Robert Treat <rob(at)xzilla(dot)net>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Gurjeet Singh <gurjeet(at)singh(dot)im>, Andres Freund <andres(at)anarazel(dot)de>, Will Storey <will(at)summercat(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Postgres Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Disabling vacuum truncate for autovacuum
Date: 2025-03-19 16:09:21
Message-ID: Z9rsMX5ZOL5E0cQy@nathan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Wed, Mar 19, 2025 at 10:40:31AM -0500, Nathan Bossart wrote:
> On Thu, Mar 20, 2025 at 12:34:59AM +0900, Fujii Masao wrote:
>> +# - Default Behavior -
>> +
>> +#vacuum_truncate = on # enable truncation after vacuum
>>
>> Since there's no existing GUC category that fits to vacuum_truncate,
>> I'm fine with adding a new category like "Vacuuming" and placing
>> vacuum_truncate there.
>>
>> However, if we do this, ISTM that the new category should also be added to
>> guc_tables.h, and vacuum_truncate should be assigned to it in guc_tables.c.
>> Additionally, the documentation should be updated to include
>> the new category, with vacuum_truncate placed under it. Thought?
>
> Ah, you're right, I need to fix the category. Will post an updated patch
> soon.

Here's a new version of the patch with the GUC placed in a new "Default
Behavior" category for vacuum-related parameters.

--
nathan

Attachment Content-Type Size
v6-0001-Add-vacuum_truncate-configuration-parameter.patch text/plain 14.7 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2025-03-19 16:13:26 Re: Restoring only a subset of schemas
Previous Message Nathan Bossart 2025-03-19 15:40:31 Re: Disabling vacuum truncate for autovacuum

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2025-03-19 16:19:24 Re: support virtual generated column not null constraint
Previous Message Yura Sokolov 2025-03-19 16:05:13 Re: Optimize truncation logic to reduce AccessExclusive lock impact