[pgpool-hackers: 2787] More configuration group?
Tatsuo Ishii
ishii at sraoss.co.jp
Thu Apr 19 13:12:11 JST 2018
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;
Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp
More information about the pgpool-hackers
mailing list