Re: vacuum_truncate configuration parameter and isset_offset

Nikolay Shaplov <dhyan@nataraj.su>

From: Nikolay Shaplov <dhyan@nataraj.su>
To: pgsql-hackers@lists.postgresql.org, Robert Treat <rob@xzilla.net>, Fujii Masao <masao.fujii@oss.nttdata.com>, Albe <laurenz.albe@cybertec.at>, Gurjeet Singh <gurjeet@singh.im>, Nathan Bossart <nathandbossart@gmail.com>, Will Storey <will@summercat.com>, Álvaro Herrera <alvherre@alvh.no-ip.org>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2025-03-24T12:42:29Z
Lists: pgsql-hackers
В письме от понедельник, 24 марта 2025 г. 15:27:35 MSK пользователь Nikolay 
Shaplov написал:

> PS. I've just looked at code for vacuum_index_cleanup it has very same
> logic, just replace "auto" with anything you like, and uses enum.
> Grep for StdRdOptIndexCleanupValues for more info

I thought about it a bit more...

ALTER TABLE test SET (vacuum_truncate);
ALTER TABLE test SET (vacuum_truncate=false);
ALTER TABLE test RESET (vacuum_truncate);

Nobody will ever guess that these are three different cases.

since for enum solution
ALTER TABLE test SET (vacuum_truncate=on);
ALTER TABLE test SET (vacuum_truncate=off);
ALTER TABLE test SET (vacuum_truncate=unset);
ALTER TABLE test RESET (vacuum_truncate);

it is quite clear that first three are different, and 4th is most probably is 
equivalent for 3rd.

So, my suggestion is to change it as soon as possible.


-- 
Nikolay Shaplov aka Nataraj
Fuzzing Engineer at Postgres Professional
Matrix IM: @dhyan:nataraj.su