},
{
+ /*
+ * There are two entries of "backend_flag" for "ALLOW_TO_FAILOVER" and
+ * "ALWAYS_PRIMARY". This is mostly ok but "pgpool show all" command
+ * displayed both backend_flag entries, which looks redundant. The
+ * reason for this is, report_all_variables() shows grouped variables
+ * first then other variables except already shown as grouped
+ * variables. Unfortunately build_variable groups() is not smart
+ * enough to build grouped variable data: it only registers the first
+ * backend_flag entry and leaves the second entry. since the second
+ * entry is not a grouped variable, backend_flag is shown firstly as a
+ * grouped variable and then is show as a non grouped variable in
+ * report_all_variables(). To fix this, mark that the second variable
+ * is also a grouped variable (the flag is set by
+ * build_config_variables()). See bug 728 for the report of the
+ * problem.
+ */
{"backend_flag", CFGCXT_RELOAD, CONNECTION_CONFIG,
"Controls various backend behavior.",
- CONFIG_VAR_TYPE_STRING_ARRAY,true, 0, MAX_NUM_BACKENDS
+ CONFIG_VAR_TYPE_STRING_ARRAY, true, VAR_PART_OF_GROUP, MAX_NUM_BACKENDS
},
NULL,
"ALWAYS_MASTER",
return true;
}
+/*
+ * Handle "pgpool show all" command.
+*/
bool report_all_variables(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend)
{
int i;
return true;
}
-
+/*
+ * Handle "pgpool show" command.
+*/
bool report_config_variable(POOL_CONNECTION *frontend, POOL_CONNECTION_POOL *backend, const char* var_name)
{
int index = 0;
/* Index is not included in parameter name.
* this is the multi value config variable */
ereport(DEBUG3,
- (errmsg("show parameter \"%s\" with out index",var_name)));
+ (errmsg("show parameter \"%s\" without index",var_name)));
send_row_description_for_detail_view(frontend, backend);
num_rows = send_array_type_variable_to_frontend(record, frontend, backend);
if (num_rows < 0)