Commit e86507d7 authored by Peter Eisentraut's avatar Peter Eisentraut

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.
parent 182362b6
...@@ -1366,7 +1366,7 @@ setup_config(void) ...@@ -1366,7 +1366,7 @@ setup_config(void)
autoconflines[1] = pg_strdup("# It will be overwritten by the ALTER SYSTEM command.\n"); autoconflines[1] = pg_strdup("# It will be overwritten by the ALTER SYSTEM command.\n");
autoconflines[2] = NULL; autoconflines[2] = NULL;
sprintf(path, "%s/%s", pg_data, PG_AUTOCONF_FILENAME); sprintf(path, "%s/postgresql.auto.conf", pg_data);
writefile(path, autoconflines); writefile(path, autoconflines);
if (chmod(path, S_IRUSR | S_IWUSR) != 0) if (chmod(path, S_IRUSR | S_IWUSR) != 0)
......
...@@ -305,10 +305,3 @@ ...@@ -305,10 +305,3 @@
*/ */
/* #define HEAPDEBUGALL */ /* #define HEAPDEBUGALL */
/* #define ACLDEBUG */ /* #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"
...@@ -26,6 +26,13 @@ ...@@ -26,6 +26,13 @@
#define MAX_KILOBYTES (INT_MAX / 1024) #define MAX_KILOBYTES (INT_MAX / 1024)
#endif #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 * Certain options can only be set at certain times. The rules are
* like this: * like this:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment