From: | Nikolay Shaplov <dhyan(at)nataraj(dot)su> |
---|---|
To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
Cc: | 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>, 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: | Re: vacuum_truncate configuration parameter and isset_offset |
Date: | 2025-03-24 15:11:32 |
Message-ID: | 3143500.usQuhbGJ8B@thinkpad-pgpro |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
В письме от понедельник, 24 марта 2025 г. 17:43:38 MSK пользователь Nathan
Bossart написал:
> * vacuum_truncate is already a Boolean reloption,
Yes, I guess schema update would be best solution here.
> so switching it to an
> enum would require enumerating all possible values accepted by
> parse_bool(), which has the following comment:
>
> /*
> * Try to interpret value as boolean value. Valid values are: true,
> * false, yes, no, on, off, 1, 0; as well as unique prefixes thereof.
> * If the string parses okay, return true, else false.
> * If okay and result is not NULL, return the value in *result.
> */
We already do it for some option. May be we need more generic solution, but
boolean should remain boolean, with only two possible values.
> * I wasn't sure whether it would be better to expose this third "unset"
> value or to make it hidden and for internal use only.
If you hide something from user, you will confuse him. If the solution is
more explicit, then it is more easy to use it, and understand it. If something
is implying (like deleted option means third value), then there would be
confusion. Please do not do that.
--
Nikolay Shaplov aka Nataraj
Fuzzing Engineer at Postgres Professional
Matrix IM: @dhyan:nataraj.su
From | Date | Subject | |
---|---|---|---|
Next Message | Nikolay Shaplov | 2025-03-24 15:12:06 | Re: vacuum_truncate configuration parameter and isset_offset |
Previous Message | Tomas Vondra | 2025-03-24 14:56:18 | Re: Snapshot related assert failure on skink |