Re: Per-database and per-user GUC settings
От | Bruce Momjian |
---|---|
Тема | Re: Per-database and per-user GUC settings |
Дата | |
Msg-id | 200202210447.g1L4l6x25888@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: Per-database and per-user GUC settings (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
test. Sorry. Tom Lane wrote: > Peter Eisentraut <peter_e@gmx.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@postgresql.org > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: