[pgpool-hackers: 2788] Re: More configuration group?

Muhammad Usama m.usama at gmail.com
Fri Apr 20 05:06:10 JST 2018


Hi Ishii-San

On Thu, Apr 19, 2018 at 9:12 AM, Tatsuo Ishii <ishii at sraoss.co.jp> wrote:

> Usama,
>
> Is there any reason we need to build configuration groups by hand?
>
> static void build_variable_groups(void)
> {
>         /* we build these by hand */
>         /* group 1. Backend config vars */
> :
> :
>
> It seems we could build configuration groups automaticaly since the
> configuration group info is already in config_generic struct.
> (config_group)
>
> struct config_generic
> {
>         /* constant fields, must be set correctly in initial value: */
>         const char              *name;                  /* name of
> variable - MUST BE FIRST */
>         ConfigContext   context;                /* context required to set
> the variable */
>         config_group    group;                  /* to help organize
> variables by function */
>         const char              *description;   /* short desc. of this
> variable's purpose */
>         config_type             vartype;                /* type of
> variable (set only at startup) */
>         bool                    dynamic_array_var;      /* true if the
> variable name contains index postfix */
>         int                             flags;                  /* flags */
>         int                             max_elements;   /* number of
> maximum elements, only valid for array type configs */
>         int                             status;                 /* status
> bits, see below */
>         int                             sourceline;             /* line in
> source file */
> :
> :
>
> If we could do this, we would have much more groups than today since
> there are many more groups actually defined in the struct.


> typedef enum
> {
>         CONNECTION_CONFIG,
>         CONNECTION_POOL_CONFIG,
>         LOGING_CONFIG,
>         HEALTH_CHECK_CONFIG,
>         FILE_LOCATION_CONFIG,
>         LOAD_BALANCE_CONFIG,
>         REPLICATION_CONFIG,
>         STREAMING_REPLICATION_CONFIG,
>         MASTER_SLAVE_CONFIG,
>         WATCHDOG_CONFIG,
>         SSL_CONFIG,
>         FAILOVER_CONFIG,
>         RECOVERY_CONFIG,
>         WATCHDOG_LIFECHECK,
>         GENERAL_CONFIG,
>         CACHE_CONFIG
> } config_group;
>
>
I think its a good idea. And  I don't see problem with doing that but I
just can't remember why I didn't do that in first place
I will take a look into this one.

Thanks
Best Regards
Muhammad Usama


> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20180420/4c760785/attachment.html>


More information about the pgpool-hackers mailing list