[PostgreSQL] postmaster.opts is Auto-generated, So Editing It is Pointless
In PostgreSQL 7.0, I was modifying postmaster.opts to add the -i option when starting postmaster, but when I restarted postgres, it returned to its pre-edited state.
It seems that since it’s an auto-generated file, editing it is pointless.
Here’s an excerpt from an article by someone who was doing the same thing:
Allow TCP access. The -i option should be added when starting postmaster.When running /etc/rc.d/init.d/postgresql, /var/lib/pgsql/data/postmaster.opts existed before I knew it. I should add -i to this.
No good. Every time postgresql is restarted, postmaster.opts is newly generated. Therefore, I need to change the original file that creates this. Looking inside /etc/rc.d/init.d/postgresql, the bourne shell script executes /etc/sysconfig/pgsql/postgresql and references PGOPTS. Therefore, it seems I should write in /etc/sysconfig/pgsql/postgresql. → That was correct. I confirmed it.
[Source]:PostgreSQL
So it seems I should modify the startup script /etc/rc.d/init.d/postgresql.
That’s all from the Gemba.