On Tue, Jan 31, 2023 at 4:25 AM Tom Lane <t...@sss.pgh.pa.us> wrote:
>
> Peter Smith <smithpb2...@gmail.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.

[1] - 
https://www.postgresql.org/message-id/CAA4eK1Kt67RdW0WTR-LTxasj3pyukPCYhfA0arDUNnsz2wh03A%40mail.gmail.com

-- 
With Regards,
Amit Kapila.


Reply via email to