Content-Length: 325345 | pFad | http://github.com/postgrespro/postgres/commit/e86507d7708591804c38de67f8ba5fdb67863810

82 Move PG_AUTOCONF_FILENAME definition · postgrespro/postgres@e86507d · GitHub
Skip to content

Commit e86507d

Browse files
committed
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.
1 parent 182362b commit e86507d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/bin/initdb/initdb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,7 @@ setup_config(void)
13661366
autoconflines[1] = pg_strdup("# It will be overwritten by the ALTER SYSTEM command.\n");
13671367
autoconflines[2] = NULL;
13681368

1369-
sprintf(path, "%s/%s", pg_data, PG_AUTOCONF_FILENAME);
1369+
sprintf(path, "%s/postgresql.auto.conf", pg_data);
13701370

13711371
writefile(path, autoconflines);
13721372
if (chmod(path, S_IRUSR | S_IWUSR) != 0)

src/include/pg_config_manual.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,3 @@
305305
*/
306306
/* #define HEAPDEBUGALL */
307307
/* #define ACLDEBUG */
308-
309-
/*
310-
* Automatic configuration file name for ALTER SYSTEM.
311-
* This file will be used to store values of configuration parameters
312-
* set by ALTER SYSTEM command.
313-
*/
314-
#define PG_AUTOCONF_FILENAME "postgresql.auto.conf"

src/include/utils/guc.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@
2626
#define MAX_KILOBYTES (INT_MAX / 1024)
2727
#endif
2828

29+
/*
30+
* Automatic configuration file name for ALTER SYSTEM.
31+
* This file will be used to store values of configuration parameters
32+
* set by ALTER SYSTEM command.
33+
*/
34+
#define PG_AUTOCONF_FILENAME "postgresql.auto.conf"
35+
2936
/*
3037
* Certain options can only be set at certain times. The rules are
3138
* like this:

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/e86507d7708591804c38de67f8ba5fdb67863810

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy