Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options
Date
Msg-id YKsCpe2nTiedRiLL@paquier.xyz
Whole thread Raw
In response to Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options
Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options
List pgsql-hackers
On Sat, May 22, 2021 at 01:47:24PM +0530, Bharath Rupireddy wrote:
> Thanks. I think using bitmaps would help us have clean code. This is
> also more extensible. See pseudo code at [1]. One disadvantage is that
> we might have bms_XXXfunction calls, but that's okay and it shouldn't
> add too much to the performance. Thoughts?
>
> [1]
> typedef enum SubOpts_enum
> {
> SUB_OPT_NONE = 0,
> SUB_OPT_CONNECT,
> SUB_OPT_ENABLED,
> SUB_OPT_CREATE_SLOT,
> SUB_OPT_SLOT_NAME,
> SUB_OPT_COPY_DATA,
> SUB_OPT_SYNCHRONOUS_COMMIT,
> SUB_OPT_REFRESH,
> SUB_OPT_BINARY,
> SUB_OPT_STREAMING
> } SubOpts_enum;

What you are writing here and your comment two paragraphs above are
inconsistent as you are using an enum here.  Please see a3dc926 and
the surrounding discussion for reasons why we've been using bitmaps
for option parsing lately.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: "houzj.fnst@fujitsu.com"
Date:
Subject: RE: Skip partition tuple routing with constant partition key
Next
From: Greg Nancarrow
Date:
Subject: Re: Re: Parallel scan with SubTransGetTopmostTransaction assert coredump