public inbox for [email protected]
help / color / mirror / Atom feedFrom: Balkrishna Pandey <[email protected]>
To: Tom Lane <[email protected]>
Cc: [email protected]
Subject: Re: Docs: Clarify that SIGHUP/reload does not update all GUCs for existing sessions
Date: Wed, 14 Jan 2026 12:27:54 +0530
Message-ID: <CAEdRop0j8cnDHhg26D8sSCu_FVfApcytsSiwKAfHubyHFji9qA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAEdRop3fo784VmdeEWc3HXn-_x-tTx6AFXgNh78WGrhKkqvgtw@mail.gmail.com>
<[email protected]>
Hi Tom,
Thanks , that is a helpful framing, and I agree my first suggestion went
too deep into GUC “context” details and still didn’t capture the full rule
(e.g., session-level SET overriding postgresql.conf).
What I was trying to address is the impression a reader may get from “so
that existing sessions also adopt the new values,” namely that *all*
changed settings automatically take effect everywhere.
Based on your explanation, I think the doc should state the behavior at the
“source of active value” level:
-
On SIGHUP, backends re-read postgresql.conf
-
A backend will only see a changed value take effect if it was previously
using the value from postgresql.conf
-
If the active value came from elsewhere (e.g., a SET in the session,
ALTER ROLE/DATABASE, etc.), then nothing changes in that session
Would something like the following be closer to the right level of
complexity?
-
The main server process also propagates this signal to all currently
running server processes, so that existing sessions also adopt the new
values (this will happen after they complete any currently-executing client
command).
-
The main server process also propagates this signal to all currently
running server processes. After completing any currently-executing command,
existing sessions re-read postgresql.conf and will adopt changed values for
parameters where their active setting was coming from postgresql.conf. If a
session’s active value was set from another source (for example, a SET
command or role/database settings), the session’s behavior will not change.
Does this phrasing align with what you had in mind? I appreciate your
feedback
Thanks in advance!
Regards,
Balkrishna
On Wed, Jan 14, 2026 at 12:17 PM Tom Lane <[email protected]> wrote:
> Balkrishna Pandey <[email protected]> writes:
> > *Proposed wording (illustrative diff):*
>
> > *+ The main server process also propagates this signal to all currently
> > running server processes.+ Existing sessions will adopt new values for
> > parameters whose context allows changes at reload+ time (for example,
> > sighup). Parameters whose context is backend or superuser-backend do not+
> > change within an already-started session; changes to those only affect
> > subsequently-launched+ sessions.*
>
> This seems to me to be getting way too far into the implementation weeds,
> while still failing to cover everything. For example, it's also true
> that a SET within the session will override postgresql.conf.
>
> The main intent of the code is that SIGHUP will propagate a
> postgresql.conf change into an existing session if that session
> had been using the previous value from postgresql.conf. If its
> source for the active value was something else, nothing changes.
> You can argue about whether "backend"-context GUCs are an exception
> to that rule, but I think our statement in the docs should be
> about at that level of complexity.
>
> regards, tom lane
>
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Docs: Clarify that SIGHUP/reload does not update all GUCs for existing sessions
In-Reply-To: <CAEdRop0j8cnDHhg26D8sSCu_FVfApcytsSiwKAfHubyHFji9qA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox