From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Smith <smithpb2250(at)gmail(dot)com>, Zheng Li <zhengli10(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pub/sub - specifying optional parameters without values. |
Date: | 2023-01-31 05:42:24 |
Message-ID: | CAA4eK1+dV6eManLjfTVNVyCCGeqDON9AVBjVTVuZXK3oy3QGJg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jan 31, 2023 at 4:25 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Peter Smith <smithpb2250(at)gmail(dot)com> writes:
> > I'd forgotten about the 'streaming' option -- AFAIK this was
> > previously a boolean parameter and so its [= value] part can also be
> > omitted. However, in PG16 streaming became an enum type
> > (on/off/parallel), and the value can still be omitted but that is not
> > really being covered by the new generic text note about booleans added
> > by yesterday's patch.
>
> Hmph. I generally think that options defined like this (it's a boolean,
> except it isn't) are a bad idea, and would prefer to see that API
> rethought while we still can.
>
We have discussed this during development and considered using a
separate option like parallel = on (or say parallel_workers = n) but
there were challenges with the same. See discussion in email [1]. We
also checked that we have various other places using something similar
for options. For example COPY commands option: HEADER [ boolean |
MATCH ]. Then GUCs like
synchronous_commit/constraint_exclusion/huge_pages/backslash_quote
have similar values. Then some of the reloptions like buffering,
vacuum_index_cleanup also have off/on/auto values. I think having an
enum where off/on are present is already used. In this case, the main
reason is that after discussion we felt it is better to have streaming
as an enum with values off/on/parallel instead of introducing a new
option.
--
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | Sam Saffron | 2023-01-31 06:27:40 | Contractions in full text search result in very surprising stemming |
Previous Message | Masahiko Sawada | 2023-01-31 05:41:35 | Re: Assertion failure in SnapBuildInitialSnapshot() |