1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Convert wal_sync_method to guc enum.

This commit is contained in:
Magnus Hagander
2008-05-12 08:35:05 +00:00
parent f8c4d7db60
commit f99760c19f
5 changed files with 77 additions and 63 deletions

View File

@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.452 2008/05/12 00:00:52 alvherre Exp $
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.453 2008/05/12 08:35:05 mha Exp $
*
*--------------------------------------------------------------------
*/
@ -270,6 +270,11 @@ static const struct config_enum_entry backslash_quote_options[] = {
{NULL, 0}
};
/*
* Options for enum values stored in other modules
*/
extern const struct config_enum_entry sync_method_options[];
/*
* GUC option variables that are exported from this module
*/
@ -2327,15 +2332,6 @@ static struct config_string ConfigureNamesString[] =
"localhost", NULL, NULL
},
{
{"wal_sync_method", PGC_SIGHUP, WAL_SETTINGS,
gettext_noop("Selects the method used for forcing WAL updates to disk."),
NULL
},
&XLOG_sync_method,
XLOG_sync_method_default, assign_xlog_sync_method, NULL
},
{
{"custom_variable_classes", PGC_SIGHUP, CUSTOM_OPTIONS,
gettext_noop("Sets the list of known custom variable classes."),
@ -2528,6 +2524,16 @@ static struct config_enum ConfigureNamesEnum[] =
assign_session_replication_role, NULL
},
{
{"wal_sync_method", PGC_SIGHUP, WAL_SETTINGS,
gettext_noop("Selects the method used for forcing WAL updates to disk."),
NULL
},
&sync_method,
DEFAULT_SYNC_METHOD, sync_method_options,
assign_xlog_sync_method, NULL
},
{
{"xmlbinary", PGC_USERSET, CLIENT_CONN_STATEMENT,
gettext_noop("Sets how binary values are to be encoded in XML."),