Skip to content

Commit 3e2dc97

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 5677378 commit 3e2dc97

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
@@ -1359,7 +1359,7 @@ setup_config(void)
13591359
autoconflines[1] = pg_strdup("# It will be overwritten by the ALTER SYSTEM command.\n");
13601360
autoconflines[2] = NULL;
13611361

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

13641364
writefile(path, autoconflines);
13651365
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
@@ -300,10 +300,3 @@
300300
/* #define HEAPDEBUGALL */
301301
/* #define ACLDEBUG */
302302
/* #define RTDEBUG */
303-
304-
/*
305-
* Automatic configuration file name for ALTER SYSTEM.
306-
* This file will be used to store values of configuration parameters
307-
* set by ALTER SYSTEM command.
308-
*/
309-
#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
@@ -18,6 +18,13 @@
1818
#include "utils/array.h"
1919

2020

21+
/*
22+
* Automatic configuration file name for ALTER SYSTEM.
23+
* This file will be used to store values of configuration parameters
24+
* set by ALTER SYSTEM command.
25+
*/
26+
#define PG_AUTOCONF_FILENAME "postgresql.auto.conf"
27+
2128
/*
2229
* Certain options can only be set at certain times. The rules are
2330
* like this:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy