postmaster.opts 是一个在数据目录中,在启动后写入的文件,其中包含用于启动 postmaster 进程的选项。 postmaster.opts 的内容用于确保 postmaster 进程能够以最初启动时相同的选项重新启动。
postmaster.opts 在 PostgreSQL 7.0 中添加。
变更历史
- PostgreSQL 7.0
- 添加(提交 dde36bfb)
示例
使用自定义选项启动后的 postmaster.opts 内容
$ 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 必须存在
$ 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"
