From: | Nikolay Shaplov <dhyan(at)nataraj(dot)su> |
---|---|
To: | Nathan Bossart <nathandbossart(at)gmail(dot)com>, Robert Haas <robertmhaas(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:12:06 |
Message-ID: | 25003040.6Emhk5qWAg@thinkpad-pgpro |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
В письме от понедельник, 24 марта 2025 г. 17:48:25 MSK пользователь Robert
Haas написал:
> On Mon, Mar 24, 2025 at 10:43 AM Nathan Bossart
>
> <nathandbossart(at)gmail(dot)com> wrote:
> > Overall, the biggest reason I didn't proceed with the enum is because it
> > felt like it was making it the user's problem. Rather than just teaching
> > our code how to determine if a reloption was explicitly set, we'd be
> > introducing unnecessary complexity to the user, or at least we'd be trying
> > to closely match the existing functionality in an attempt to hide this
> > complexity from them.
>
> +1. Giving the user the ability to set the option to a value called
> "unset" doesn't seem right to me.
1. Enum allows you to make default value "unreachable" for setting. But this
is not the most important thing.
2. This option has three possible values: on/off/system_default. We can find
better name for system_default, but it would not change it's meaning.
I would prefer to let user set these three values explicitly.
Nobody would guess that
ALTER TABLE test SET (vacuum_truncate=false);
means "off"
and
ALTER TABLE test RESET (vacuum_truncate);
means "system_default"
This will lead to a lot of confusion.
So I strongly against this implying third value for boolean. This is nasty
thing. Boolean should have two values.
--
Nikolay Shaplov aka Nataraj
Fuzzing Engineer at Postgres Professional
Matrix IM: @dhyan:nataraj.su
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2025-03-24 15:25:44 | Re: vacuum_truncate configuration parameter and isset_offset |
Previous Message | Nikolay Shaplov | 2025-03-24 15:11:32 | Re: vacuum_truncate configuration parameter and isset_offset |