设为首页 加入收藏

TOP

PostgreSQL启动过程中的那些事三:加载GUC参数(二)
2014-11-23 20:12:34 来源: 作者: 【 】 浏览:43
Tags:PostgreSQL 启动 过程 那些 加载 GUC 参数
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

首页 上一页 1 2 3 下一页 尾页 2/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇MySQL复制(一) --- 二进制日志.. 下一篇用mysql存储二进制数据流

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: