Re: Permanent settings

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Permanent settings
Date: 2008-02-19 16:31:56
Message-ID: ebbd950e86260fbbb55e23eec042ae74@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)turnstep(dot)com
PGP Key: 0x14964AC8 200802191128
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

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

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2008-02-19 16:41:56 Including PL/PgSQL by default
Previous Message Magnus Hagander 2008-02-19 16:20:18 Re: Permanent settings