Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Josh Berkus <josh(at)agliodbs(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])
Date: 2013-08-30 13:53:13
Message-ID: 20130830135313.GI2706@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Andres Freund (andres(at)2ndquadrant(dot)com) wrote:
> Technically trivial in the sense that it should be queryable from SQL
> without having to write code in an untrusted PL ;).

hah.

> I guess storing the file modification date along the file/location a GUC
> is originating from would be good enough. Then you could write a query
> using pg_stat_file() to make sure they are up2date.

Wouldn't you want to actually look at the GUC and see if the value is
different also? Just knowing that postgresql.conf changed doesn't mean
you want every value to say it's different... It's entirely possible
that the file was rewritten or touch'd but the configuration is
identical.

> > > * Configuration variables only come from locations that are approved for
> > > in your scenario (Already possible, we might want to make it even easier)
> >
> > That an interesting notion; do you have something specific in mind..?
> > The easiest, imv anyway, would be that options set in postgresql.conf
> > can't be overridden, but that gets us into the bootstrap problem that
> > people seem to be concerned about. It would also be a change to how
> > postgresql.conf is parsed today which some people would be annoyed by.
> > Having some configuration option which says what can be modified by
> > alter system doesn't strike me as a terribly good solution either.
>
> I think changing the precedence of options in postgresql.conf has about
> zero chance.

Sadly, you're probably right.

> That would make it possible to easily write a query that works across
> intallation that warns about any values stored in auto.conf, even if
> they are overwritten by a per-user config or similar.

I had the impression that 'approved for' above meant something which
actually *enforced* it rather than just another monitoring check..

Thanks,

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-08-30 13:54:52 Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])
Previous Message Andres Freund 2013-08-30 13:50:30 Re: Variadic aggregates vs. project policy