From: Peter Eisentraut Date: Thu, 4 Dec 2014 00:54:01 +0000 (-0500) Subject: Move PG_AUTOCONF_FILENAME definition X-Git-Tag: REL9_4_0~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3e2dc9703a4835ace14310f82369df0a4e8528f2;p=thirdparty%2Fpostgresql.git Move PG_AUTOCONF_FILENAME definition Since this is not something that a user should change, pg_config_manual.h was an inappropriate place for it. In initdb.c, remove the use of the macro, because utils/guc.h can't be included by non-backend code. But we hardcode all the other configuration file names there, so this isn't a disaster. --- diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 5036d01b608..874775577a4 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -1359,7 +1359,7 @@ setup_config(void) autoconflines[1] = pg_strdup("# It will be overwritten by the ALTER SYSTEM command.\n"); autoconflines[2] = NULL; - sprintf(path, "%s/%s", pg_data, PG_AUTOCONF_FILENAME); + sprintf(path, "%s/postgresql.auto.conf", pg_data); writefile(path, autoconflines); if (chmod(path, S_IRUSR | S_IWUSR) != 0) diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h index ba17c4d1f25..311d7cb379f 100644 --- a/src/include/pg_config_manual.h +++ b/src/include/pg_config_manual.h @@ -300,10 +300,3 @@ /* #define HEAPDEBUGALL */ /* #define ACLDEBUG */ /* #define RTDEBUG */ - -/* - * Automatic configuration file name for ALTER SYSTEM. - * This file will be used to store values of configuration parameters - * set by ALTER SYSTEM command. - */ -#define PG_AUTOCONF_FILENAME "postgresql.auto.conf" diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h index 1493d2cb79c..ed6515a07e5 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -18,6 +18,13 @@ #include "utils/array.h" +/* + * Automatic configuration file name for ALTER SYSTEM. + * This file will be used to store values of configuration parameters + * set by ALTER SYSTEM command. + */ +#define PG_AUTOCONF_FILENAME "postgresql.auto.conf" + /* * Certain options can only be set at certain times. The rules are * like this: