A file containing the options used to start the postmaster

postmaster.opts is a file in the data directory written after startup which contains the options used to start the postmaster process. The contents of postmaster.opts are used to ensure the postmaster process can be restarted with the same options with which it was originally started.

postmaster.opts was added in PostgreSQL 7.0.

Change history


Contents of postmaster.opts following a startup with custom options:

$ pg_ctl -D /tmp/opttest -l /tmp/opttest.log -o '-p5434' start
$ cat /tmp/opttest/postmaster.opts 
/usr/local/bin/postgres "-D" "/tmp/opttest" "-p5434"

postmaster.opts must be present for a restart to succeed:

$ rm /tmp/opttest/postmaster.opts
$ pg_ctl -D /tmp/opttest restart
waiting for server to shut down.... done
server stopped
pg_ctl: could not read file "/tmp/opttest/postmaster.opts"


Data directory, PostgreSQL internals

See also