On Sat, 24 Oct 2009, Andrew Dunstan wrote:

If we're going to do this at all, ISTM the location should be configurable, just like other file locations are.
...
What bothers me some is that it sounds like a bit of a footgun. A postgres cluster is a shared resource, and we surely don't want applications meddling with the shared config. This seems quite different from, say, an application dropping a file in /etc/cron.d.

It's hard to satisfy both these at once. If you want to make it secured against random application changes, the logical default place to put the files is in the database directory itself. If apps are allowed to write there, they can surely cause more mayhem them just overwriting the config files. If instead you allow the files to go anywhere, that's more flexible, but then requires you to make sure that alternate location is similarly secured.

Regardless, the UI I was hoping for was to make the default postgresql.conf file end with a line like this:

directory 'conf'

Which makes the inclusion explicit for people used to navigating the current style: look for a "conf" directory under PGDATA, those have the modifications you're looking for. That's also easy for distributors to patch, so you might even have the RHEL build ship with something like:

directory '/etc/sysconfig/postgresql/config'

I don't think it's asking too much of tool authors that given a PGDATA, they would need to parse the postgresql.conf file in there just well enough to figure out where the directory(s) of additional config files is at. That level of config file manipulation there's already code for in initdb, I was planning to refactor that into a library I can include for the built-in pgtune I've been planning.

--
* Greg Smith [email protected] http://www.gregsmith.com Baltimore, MD

--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to