mirror of
https://github.com/postgres/postgres.git
synced 2025-06-13 07:41:39 +03:00
Clean up some inconsistencies with GUC declarations
This is similar to 7d25958
, and this commit takes care of all the
remaining inconsistencies between the initial value used in the C
variable associated to a GUC and its default value stored in the GUC
tables (as of pg_settings.boot_val).
Some of the initial values of the GUCs updated rely on a compile-time
default. These are refactored so as the GUC table and its C declaration
use the same values. This makes everything consistent with other
places, backend_flush_after, bgwriter_flush_after, port,
checkpoint_flush_after doing so already, for example.
Extracted from a larger patch by Peter Smith. The spots updated in the
modules are from me.
Author: Peter Smith, Michael Paquier
Reviewed-by: Nathan Bossart, Tom Lane, Justin Pryzby
Discussion: https://postgr.es/m/CAHut+PtHE0XSfjjRQ6D4v7+dqzCw=d+1a64ujra4EX8aoc_Z+w@mail.gmail.com
This commit is contained in:
@ -526,7 +526,7 @@ int ssl_renegotiation_limit;
|
||||
* This really belongs in pg_shmem.c, but is defined here so that it doesn't
|
||||
* need to be duplicated in all the different implementations of pg_shmem.c.
|
||||
*/
|
||||
int huge_pages;
|
||||
int huge_pages = HUGE_PAGES_TRY;
|
||||
int huge_page_size;
|
||||
|
||||
/*
|
||||
@ -543,7 +543,14 @@ static char *locale_ctype;
|
||||
static char *server_encoding_string;
|
||||
static char *server_version_string;
|
||||
static int server_version_num;
|
||||
static int syslog_facility;
|
||||
|
||||
#ifdef HAVE_SYSLOG
|
||||
#define DEFAULT_SYSLOG_FACILITY LOG_LOCAL0
|
||||
#else
|
||||
#define DEFAULT_SYSLOG_FACILITY 0
|
||||
#endif
|
||||
static int syslog_facility = DEFAULT_SYSLOG_FACILITY;
|
||||
|
||||
static char *timezone_string;
|
||||
static char *log_timezone_string;
|
||||
static char *timezone_abbreviations_string;
|
||||
@ -559,7 +566,14 @@ static int shared_memory_size_in_huge_pages;
|
||||
static int wal_block_size;
|
||||
static bool data_checksums;
|
||||
static bool integer_datetimes;
|
||||
static bool assert_enabled;
|
||||
|
||||
#ifdef USE_ASSERT_CHECKING
|
||||
#define DEFAULT_ASSERT_ENABLED true
|
||||
#else
|
||||
#define DEFAULT_ASSERT_ENABLED false
|
||||
#endif
|
||||
static bool assert_enabled = DEFAULT_ASSERT_ENABLED;
|
||||
|
||||
static char *recovery_target_timeline_string;
|
||||
static char *recovery_target_string;
|
||||
static char *recovery_target_xid_string;
|
||||
@ -1181,11 +1195,7 @@ struct config_bool ConfigureNamesBool[] =
|
||||
GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
|
||||
},
|
||||
&assert_enabled,
|
||||
#ifdef USE_ASSERT_CHECKING
|
||||
true,
|
||||
#else
|
||||
false,
|
||||
#endif
|
||||
DEFAULT_ASSERT_ENABLED,
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
@ -1357,11 +1367,7 @@ struct config_bool ConfigureNamesBool[] =
|
||||
gettext_noop("Enables updating of the process title every time a new SQL command is received by the server.")
|
||||
},
|
||||
&update_process_title,
|
||||
#ifdef WIN32
|
||||
false,
|
||||
#else
|
||||
true,
|
||||
#endif
|
||||
DEFAULT_UPDATE_PROCESS_TITLE,
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
@ -2888,11 +2894,7 @@ struct config_int ConfigureNamesInt[] =
|
||||
GUC_EXPLAIN
|
||||
},
|
||||
&effective_io_concurrency,
|
||||
#ifdef USE_PREFETCH
|
||||
1,
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
DEFAULT_EFFECTIVE_IO_CONCURRENCY,
|
||||
0, MAX_IO_CONCURRENCY,
|
||||
check_effective_io_concurrency, NULL, NULL
|
||||
},
|
||||
@ -2906,11 +2908,7 @@ struct config_int ConfigureNamesInt[] =
|
||||
GUC_EXPLAIN
|
||||
},
|
||||
&maintenance_io_concurrency,
|
||||
#ifdef USE_PREFETCH
|
||||
10,
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
DEFAULT_MAINTENANCE_IO_CONCURRENCY,
|
||||
0, MAX_IO_CONCURRENCY,
|
||||
check_maintenance_io_concurrency, assign_maintenance_io_concurrency,
|
||||
NULL
|
||||
@ -4613,11 +4611,7 @@ struct config_enum ConfigureNamesEnum[] =
|
||||
NULL
|
||||
},
|
||||
&syslog_facility,
|
||||
#ifdef HAVE_SYSLOG
|
||||
LOG_LOCAL0,
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
DEFAULT_SYSLOG_FACILITY,
|
||||
syslog_facility_options,
|
||||
NULL, assign_syslog_facility, NULL
|
||||
},
|
||||
|
Reference in New Issue
Block a user