config_file
Fact — official short description: “Sets the server’s main configuration file.”
Identity
Lifecycle
| Fact | Value |
|---|---|
| First observed | PG9.0 (research boundary) |
| Present in | PG9.0–19 Beta 3 |
| Removed in | No |
| Introduction commit | Not asserted: predates the PG9.0 research boundary |
| Commit date | — |
| Discussion | — |
Default history
| Versions | Raw boot_val |
Unit | Human value |
|---|---|---|---|
| PG9.0–19 Beta 3 | — | — | not set |
How it works
Sets the server’s main configuration file. The value is fixed when the server starts, so changing it requires a restart.
PostgreSQL determines this path before reading the main configuration, so config_file itself can only be supplied on the postgres command line. Includes are resolved by the chosen configuration, while data_directory may point somewhere else.
Monitor and change config_file together with allow_alter_system, data_directory, hba_file. Validate on the relevant server role and real workload, then use its postmaster context to choose session change, reload, or restart; a historical boot default is not the current effective value.
Tuning advice
Advice. These are workload-specific starting points and must be validated with measurements.
| Workload | Guidance |
|---|---|
| OLTP | config_file is deployment topology, not workload tuning. Use an absolute path, least privilege, and atomic configuration rollout; verify access as the postgres service account before restart/reload. |
| OLAP | Follow the OLTP rule, and for separate mounts also verify boot ordering, backup coverage, and path consistency on failover nodes. |
| Small nodes | The default co-located layout is simplest. Split paths only for a concrete backup, packaging, or permission-isolation benefit. |
Pigsty
Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.
| Template | Effective value | Versus upstream boot | Source expression |
|---|---|---|---|
| OLTP | Unmodified | — | — |
| OLAP | Unmodified | — | — |
| CRIT | Unmodified | — | — |
| TINY | Unmodified | — | — |
Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.0–19 Beta 3 unmodified; OLAP: PG9.0–19 Beta 3 unmodified; CRIT: PG9.0–19 Beta 3 unmodified; TINY: PG9.0–19 Beta 3 unmodified. No Pigsty-specific rationale is inferred from an absent override.
Common pitfalls
- Missing directory traversal, read, or write permission for the service account.
- Confusing restart requirements for a path with reload behavior of the selected file contents.
- Omitting the path on a failover node or from backup inventory.
- Using a relative path that depends on an unstable working directory.
Related parameters
allow_alter_system · data_directory · hba_file · ident_file · external_pid_file · extension_destdir