postgresql.auto.conf
postgresql.auto.conf
is a configuration file with the same format as postgresql.conf, but which is located in the data directory and is managed by PostgreSQL itself (via the ALTER SYSTEM
command) or client applications (e.g. pg_basebackup
in PostgreSQL 12 and later). Normally it should not be edited manually.
postgresql.auto.conf
is always evaluated last, so configuration settings stored here will always override settings in other files.
postgresql.auto.conf
was added in PostgreSQL 9.4.
Source code
The filename is defined in src/include/utils/guc.h as:
#define PG_AUTOCONF_FILENAME "postgresql.auto.conf"
Functions related to modifying postgresql.auto.conf
are located in src/backend/utils/misc/guc.c, in particular:
AlterSystemSetConfigFile()
- the underlying function for ALTER SYSTEMreplace_auto_config_value()
write_auto_conf_file()
postgresql.auto.conf
is processed in src/backend/utils/misc/guc.c, function ProcessConfigFileInternal()
.
Change history
- PostgreSQL 9.4
- added (commit 65d6e4cb)
References
- PostgreSQL documentation: ALTER SYSTEM
- PostgreSQL documentation: Parameter Interaction via the Configuration File