Re: naming of async_mode parameter - Mailing list pgsql-hackers

From Etsuro Fujita
Subject Re: naming of async_mode parameter
Date
Msg-id CAPmGK16iMTn4N0BnBV1OZ+AdH_5ojG-4Z+q+HqxeAy7Vo52eNw@mail.gmail.com
Whole thread Raw
In response to naming of async_mode parameter  (Zhihong Yu <zyu@yugabyte.com>)
Responses Re: naming of async_mode parameter
List pgsql-hackers
Hi,

On Thu, May 13, 2021 at 2:23 AM Zhihong Yu <zyu@yugabyte.com> wrote:
> I was looking at
>   Fix EXPLAIN ANALYZE for async-capable nodes.

Thanks for that!

> which adds the following parameter / field:
>
> +   bool        async_mode;     /* true if node is in async mode */
>
> async_mode implies an enum: {sync, async}
> Since there are only two values, the data type is bool. I think it should be named is_async.

By async_mode, I mean "is in async mode?", as commented above.  I
thought the naming is_in_async_mode would be a bit long, so I
shortened it to async_mode.  IIUC, I think another example in our
codebase would be the hash_spill_mode parameter in the AggState
struct.  So I think async_mode would be acceptable IMO.

Best regards,
Etsuro Fujita



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Forget close an open relation in ReorderBufferProcessTXN()
Next
From: Noah Misch
Date:
Subject: Re: View invoker privileges