Re: Per-database and per-user GUC settings

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Per-database and per-user GUC settings
Date: 2002-02-21 04:47:06
Message-ID: 200202210447.g1L4l6x25888@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


test. Sorry.

Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > I think it's desirable and fully intentional. How else would you override
> > command-line args without restarting the server?
>
> I say you wouldn't. If it's on the command line then it overrides
> postgresql.conf for that run of the postmaster; full stop, no "if"s.
> If you wanted it to be changeable within-run by postgresql.conf then you
> should have edited postgresql.conf to start with.
>
> As the implementation currently works, applying a setting via the
> command line is entirely unsafe unless you then back it up with fixing
> the value in postgresql.conf; otherwise an unrelated change to
> postgresql.conf, perhaps much later, blows the command-line setting
> out of the water. You might as well eliminate command-line settings
> entirely, if they have to be accompanied by a matching change in
> postgresql.conf in order to work reliably.
>
> IMHO the only reason we haven't gotten squawks about this is that
> (a) the majority of uses of command-line arguments are for options
> that can't be changed after postmaster start anyway (-i, -p, -B, -N);
> (b) since the factory-default postgresql.conf has all settings commented
> out, it doesn't actually cause reversions to happen at SIGHUP.
>
> If any significant number of people were actually being exposed to the
> current behavior, we'd be getting complaints; lots of 'em. At the
> moment it's only a corner case because of considerations (a) and (b),
> so few people have had it happen to them.
>
> > but in my mind, if you're using command-line arguments
> > in permanent setups, you're not trying hard enough.
>
> You're essentially saying that command-line arguments are only useful
> for prototyping changes that you intend to make in postgresql.conf
> immediately thereafter. Again, why have we got a command-line option
> facility at all? Might as well make the change in postgresql.conf
> to begin with, if that's the viewpoint.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2002-02-21 05:01:28 Re: MySQL/InnoDB benchmarks
Previous Message Darren Johnson 2002-02-21 04:42:02 Re: A Replication Idea