PostgreSQL's `config_file` parameter has a unique bootstrap paradox: it tells the server where to find `postgresql.conf`, but cannot itself be stored in that file. It can only be set via the `postgres` command line using `-c config_file=/path/to/postgresql.conf`. The most practical use of `config_file` is reading it via `SHOW config_file` to determine which configuration file the running server actually loaded — critical when edits seem to have no effect, often because you're editing the wrong file. Different Linux packaging systems (RPM vs Debian/Ubuntu) place `postgresql.conf` in different locations, making this command essential. Three companion parameters — `data_directory`, `hba_file`, and `ident_file` — handle other startup locations, with `hba_file` and `ident_file` allowed inside `postgresql.conf` since the bootstrap paradox doesn't apply to them.

2m read timeFrom postgr.es
Post cover image
229 Impressions