been started within Nseconds."),
NULL,
GUC_UNIT_S
},
&XLogArchiveTimeout,
0,0, INT_MAX,
NULL,NULL, NULL
},
……
/*End-of-list marker */
{
{NULL,0, 0, NULL, NULL}, NULL, 0, 0, 0, NULL, NULL, NULL
}
};
static struct config_realConfigureNamesReal[] =
{
{
{"seq_page_cost",PGC_USERSET, QUERY_TUNING_COST,
gettext_noop("Setsthe planner's estimate of the cost of a "
"sequentially fetched disk page."),
NULL
},
&seq_page_cost,
DEFAULT_SEQ_PAGE_COST,0, DBL_MAX,
NULL,NULL, NULL
},
/*End-of-list marker */
{
{NULL,0, 0, NULL, NULL}, NULL, 0.0, 0.0, 0.0, NULL, NULL, NULL
}
};
static struct config_stringConfigureNamesString[] =
{
{
{"archive_command",PGC_SIGHUP, WAL_ARCHIVING,
gettext_noop("Setsthe shell command that will be called to archive a WAL file."),
NULL
},
&XLogArchiveCommand,
"",
NULL,NULL, show_archive_command
},
……
/*End-of-list marker */
{
{NULL,0, 0, NULL, NULL}, NULL, NULL, NULL, NULL, NULL
}
};
static struct config_enumConfigureNamesEnum[] =
{
{
{"backslash_quote",PGC_USERSET, COMPAT_OPTIONS_PREVIOUS,
gettext_noop("Setswhether \"\\'\" is allowed in string literals."),
NULL
},
&backslash_quote,
BACKSLASH_QUOTE_SAFE_ENCODING,backslash_quote_options,
NULL,NULL, NULL
},
……
/*End-of-list marker */
{
{NULL,0, 0, NULL, NULL}, NULL, 0, NULL, NULL, NULL, NULL
}
};
上面五个结构定义中,每个结构的第一个成员变量都是一个config_generic结构的gen成员,下面是config_generic的结构定义:
struct config_generic
{
/* constantfields, must be set correctly in initial value: */
const char *name; /* name of variable - MUST BE FIRST */
GucContext context; /* context required to set the variable */
enumconfig_group group; /* to help organize variables by function */
const char *short_desc; /* short desc. of this variable's purpose */
const char *long_desc; /* long desc. of this variable's purpose */
int flags; /* flag bits, see below*/
/* variablefields, initialized at runtime: */
enumconfig_type vartype; /* type of variable (set only at startup) */
int status; /* status bits, see below*/
GucSource reset_source; /* source of thereset_value */
GucSource source; /*source of the current actual value */
GucStack *stack; /* stacked outside-of-transaction states */
void *extra; /*"extra" pointer for current actual value */
char *sourcefile; /* filecurrent setting is from (NULL if not
* file) */
int