Bruce Momjian <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > What if someone does -C /var/data/postgresql.conf, and postgresql.conf > say to use /usr/local/data for data, what do we do?
Well, the patch says that the command line switch wins, which is consistent with what we do for other command line switches (they all override the equivalent postgresql.conf entries). This does seem a bit at variance with the stated goal of making the configuration more clearly documented, though :-(. If you actually use the capability then your config file will be lying to you about where things are. It's worth pointing out in this connection that for the most part I think people are moving *away* from using command line switches; it's better to set the value in postgresql.conf, both for documentation reasons and because that way you have some chance of changing the value via config file update and SIGHUP. The only way to change a value on the command line is to restart the postmaster. Plus, if you're using a distribution-supplied init script to start the postmaster, it's hard to get any switches in without hacking the script anyway. Most of these objections also apply to values obtained from environment variables (the exception is that postgresql.conf can override environment variables). So all in all I feel that we don't want to encourage more use of command line switches or environment variables to configure the postmaster. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html