From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Issue with PGC_BACKEND parameters |
Date: | 2014-01-30 20:12:11 |
Message-ID: | 17896.1391112731@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> On 12/22/2013 11:30 PM, Amit Kapila wrote:
> - * backend start.
> + * backend start. However for windows, we need to process
> + * config file during backend start for non-default
> parameters,
> + * so we need to allow change of PGC_BACKEND during backend
> + * startup.
> */
> - if (IsUnderPostmaster)
> + if (IsUnderPostmaster && !IsInitProcessingMode())
> return -1;
> }
> I think this change looks OK.
The comment is pretty awful, since this is neither Windows-specific nor
a read of the config file. Perhaps more like "However, in EXEC_BACKEND
builds we load nondefault settings from the CONFIG_EXEC_PARAMS file during
backend start. In that situation we should accept PGC_SIGHUP
settings, so as to have the same value as if we'd forked from the
postmaster."
Also, I think that the extra test should only be made #ifdef EXEC_BACKEND,
so as to minimize the risk of breaking things. Not that this isn't pretty
darn fragile anyway; I think testing IsInitProcessingMode here is a very
random way to detect this case. I wonder if it'd be better to pass down
an explicit flag indicating that we're doing read_nondefault_variables().
If we don't do that, maybe an Assert(IsInitProcessingMode()) in
read_nondefault_variables() would be a good thing.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2014-01-30 20:31:43 | Re: Issue with PGC_BACKEND parameters |
Previous Message | Alvaro Herrera | 2014-01-30 20:04:00 | Re: updated emacs configuration |