From: | Nikolay Shaplov <dhyan(at)nataraj(dot)su> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org, Robert Treat <rob(at)xzilla(dot)net>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Albe <laurenz(dot)albe(at)cybertec(dot)at>, Gurjeet Singh <gurjeet(at)singh(dot)im>, Nathan Bossart <nathandbossart(at)gmail(dot)com>, Will Storey <will(at)summercat(dot)com>, Álvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | vacuum_truncate configuration parameter and isset_offset |
Date: | 2025-03-24 12:27:35 |
Message-ID: | 2176413.otsE0voPBg@thinkpad-pgpro |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi! I've tired to rebase my reloptions patch (https://
commitfest.postgresql.org/patch/4688/)
and have stuck with 0164a0f9 commit.
I am deeply involved with reloptions topic, and I should say that I do not
like the idea of isset_offset field
All other types, as you have mentioned in commit messages, all other types
manages "Not set" feature via some specific default value (like -1 for positive
integer for example or "auto" for enums). But you can't do that in boolean,
and this is true.
If you add isset_offset in this case, it would be useless for all types, except
boolean. It will make whole design inconsistent, and this is bad.
I would suggest to use enum here to achieve same goal, or add some "trilean"
data type that can be "true/false/unset"
Current reloption code is already a big mess, there is no reason to make it
worse.
Can we revert it, and do it again, without adding isset_offset field? I can
write some code for it too.
Or we can patch it over, but I am afraid something will go wrong and we will
stuck with isset_offset forever. I do not want it to happen.
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
StdRdOptIndexCleanupValues
--
Nikolay Shaplov aka Nataraj
Fuzzing Engineer at Postgres Professional
Matrix IM: @dhyan:nataraj.su
From | Date | Subject | |
---|---|---|---|
Next Message | Ashutosh Bapat | 2025-03-24 12:38:07 | Re: Enhance 'pg_createsubscriber' to retrieve databases automatically when no database is provided. |
Previous Message | Alvaro Herrera | 2025-03-24 12:14:55 | Re: Test to dump and restore objects left behind by regression |