Move PG_AUTOCONF_FILENAME definition
authorPeter Eisentraut <peter_e@gmx.net>
Thu, 4 Dec 2014 00:54:01 +0000 (19:54 -0500)
committerPeter Eisentraut <peter_e@gmx.net>
Thu, 4 Dec 2014 00:54:01 +0000 (19:54 -0500)
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.

src/bin/initdb/initdb.c
src/include/pg_config_manual.h
src/include/utils/guc.h

index 3bee6573afce26e36c877b07af31e9349da08b34..ed082409b7297944fe11e70fa2954b46ac19cfd5 100644 (file)
@@ -1366,7 +1366,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)
index b82f0f70bdaf0a3402933417b03a0812975df7af..38a2e9051f8f608a10ecda9ee8f73009ff05e4b4 100644 (file)
  */
 /* #define HEAPDEBUGALL */
 /* #define ACLDEBUG */
-
-/*
- * 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"
index 395858b102297efcbe19b964d29f9ec687841aba..80813d23210c4ab2f7a574fc960a373afa6be8c0 100644 (file)
 #define MAX_KILOBYTES  (INT_MAX / 1024)
 #endif
 
+/*
+ * 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: