Re: Permanent settings - Mailing list pgsql-hackers

From Greg Sabino Mullane
Subject Re: Permanent settings
Date
Msg-id ebbd950e86260fbbb55e23eec042ae74@biglumber.com
Whole thread Raw
In response to Permanent settings  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


> What I'd really like to see is something like a new keyword on the SET
> command, so you could to SET PERMANENT foo=bar, which would write the
> configuration back into postgresql.conf.

FWIW, I made a Pl/PerlU function that did this at one point. At first, I
parsed the postgresql.conf file and rewrote it, but after a while
I switched to the include a writeable file idea. The downside to that was
trying to follow the path of files to figure out what a particular setting
was (e.g. "grep 'effective' postgresql.conf" no longer provided a canonical
answer), so at the end of the day I simply appended a big comment to the bottom
of the postgresql.conf file and added the settings there. Rather than
adding 100 lines for 100 changes to the same variable, the function checked
the postgresql.conf into version control[1] after every change. That might be
ambitious for the SET command to handle, but it would sure be a slick feature :)
If not that, it might be nice to provide a switch to allow 100 lines, with
timestamp, if desired. An optional comment from the command line would be
another nice touch:

SET PERMANENT effective_cache_size='4GB' COMMENT='Added more RAM to box'

[1] As long as your version control was cvs, subversion, git, or rcs.

- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200802191128
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAke7BGAACgkQvJuQZxSWSsg4GQCg3nnXaRBvZqJRnFIkq+Y8sXRr
hZ4AoPVQnJEnk3lJFpNJmikuDwaqz88c
=5BwE
-----END PGP SIGNATURE-----




pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Permanent settings
Next
From: David Fetter
Date:
Subject: Including PL/PgSQL by default