Everyone has their own style, unfortunately, on how they edit postgresql.conf. Some like to uncomment specific values and edit them at the point they appear in the default file, some like to tack overrides onto the end… and some do a mixture of those (don’t do that).
My personal preference is to leave everything in the default file commented, and include an overrides file (postgresql.local.conf). That way, I have an easy reference for what the defaults are, and minimum changes when a new version of postgresql.conf lands (you do know that checkpoint_segments is obsolete in 9.5, and you can’t specify it, right?). It’s easy for me to see what I’ve changed, since I can just consult that one included file.
I highly recommend this. But whatever you do, don’t do the “some things in the middle, some things at the end,” please. The next person to edit the file will thank you.
Comments
Dan Langille ·
I can't find documentation on postgresql.local.confDan Langille ·
Oh... include files http://www.postgresql.org/docs/9.4/static/config-setting.html#CONFIG-INCLUDESXof ·
It's just the postgresql.confincludefacility:include 'postgresql.local.conf'Andrew Dunstan ·
I'm a big fan of the postgresql.local.conf approach.par-t ·
Great piece of information! May I reference part of this on my blog if I post a backlink to this webpage? Thx.frank church ·
I had no idea this existed. In which version was it first implemented?Xof ·
The include directive? That's been there for a while; 9.x at least.