A configuration file located in the data directory which stores configuration settings generated via PostgreSQL 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. is always evaluated last, so configuration settings stored here will always override settings in other files. was added in PostgreSQL 9.4.

Source code

The filename is defined in src/include/utils/guc.h as:

#define PG_AUTOCONF_FILENAME      ""

Functions related to modifying are located in src/backend/utils/misc/guc.c, in particular:

  • AlterSystemSetConfigFile() - the underlying function for ALTER SYSTEM
  • replace_auto_config_value()
  • write_auto_conf_file() is processed in src/backend/utils/misc/guc.c, function ProcessConfigFileInternal().

Change history



See also

ALTER SYSTEM, postgresql.conf, pg_settings, pg_file_settings