config_file tells the PostgreSQL server where postgresql.conf lives, which should make you squint for a second. If the server learns where its configuration file is from a parameter, and parameters come from the configuration file, how does it ever find the first one?

It doesn’t, and that is exactly why config_file is the one parameter in PostgreSQL you cannot put in postgresql.conf. You set it only on the postgres command line, with -c config_file=/path/to/postgresql.conf. ALTER SYSTEM SET config_file is refused outright (ERROR: parameter "config_file" cannot be changed), and a line for it inside the config file would be a snake eating its own tail. The location of the configuration file cannot be stored in the configuration file. The context is postmaster, so it is fixed for the life of the running server, and by default it points at postgresql.conf in the data directory.

What config_file is genuinely good for is the opposite of setting it: reading it. SHOW config_file tells you, authoritatively, which postgresql.conf the running server actually loaded. That answers a question which comes up constantly, because where the file lives depends entirely on who packaged your PostgreSQL. The community RPMs keep it in the data directory; Debian and Ubuntu put it under /etc/postgresql/<version>/<cluster>/ and launch the server with a -c config_file= pointing there, leaving the data directory conspicuously without the file you went looking for. When you are editing a postgresql.conf that stubbornly refuses to change anything, the reason is almost always that it isn’t the one the server read, and SHOW config_file settles it in a single line.

config_file has three companions for the other locations the server has to find at startup: data_directory, hba_file, and ident_file. The division of labor among them is the instructive part. hba_file and ident_file are allowed to live inside postgresql.conf, because by the time the server needs to locate pg_hba.conf it has already found and read its main configuration, so there is no paradox to resolve. config_file stands alone in being command-line-only, for the bootstrap reason this whole post is built on. Each of the four has its own SHOW, and on any server whose on-disk layout you don’t already know cold, running those four beats guessing every time.