Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vfwAL-006Es9-1w for pgsql-docs@arkaria.postgresql.org; Wed, 14 Jan 2026 08:23:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vfwAK-008ttg-2J for pgsql-docs@arkaria.postgresql.org; Wed, 14 Jan 2026 08:23:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vfupT-008M3d-01 for pgsql-docs@lists.postgresql.org; Wed, 14 Jan 2026 06:58:07 +0000 Received: from mail-yw1-x112b.google.com ([2607:f8b0:4864:20::112b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vfupQ-000KlC-1h for pgsql-docs@lists.postgresql.org; Wed, 14 Jan 2026 06:58:06 +0000 Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-792815157f3so32116617b3.1 for ; Tue, 13 Jan 2026 22:58:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768373884; x=1768978684; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=nKd9d0FzH2uhDMzQ2Y1mXCuecJPN0tLLrPXsqKrsycw=; b=ZOzIopHHilcxPz98jVYwhPbV+O0X1jeZj8XKc2/vc/QPtYijwDIHJRSK7d46xTCxxM VcFUcSqf/pdup1KcY9NfknkwyrLBJEjJJiH8/da5juJYcrY292hon0MV4/aH9IikQDer T7KgqkmZK4MHEKLhP8k1LdmzXWFAjTPZBo2NY/+L4u9A4hfHYMyqtqe3+PN/K/YB8oJv tCHqLb+DsleCTzEcjhx1nNrXDmamcRIP514A4G0JgHemw0M3VNEXjEqLtdPjry1TG32l EEJvSBp13O6Y4VsGXUOhJ/FCifIuJ9CDNGr5lUbq4RgtDQ8HFtdAv9avWMKH9NWUdx2T zPSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768373884; x=1768978684; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=nKd9d0FzH2uhDMzQ2Y1mXCuecJPN0tLLrPXsqKrsycw=; b=icmkj0v6vt5cPRNYUQtjdIX2bkuerOijDvONP+LEPEdzCxJ6MyLTXXKPR6Yh9Aw8ZR 5yZhEkiLfxjKsxwNgf12O5sOCZPIybzfomrAQVh4teSLvmA4iF7yEv8aT5h+ZW8Glcya BCSQhSgZvPd5xryUQtdTm3CaP+/Z2vNBX97rPqZnghve7ohQQPnbbI62rFOtmhinFnIp luJhUEqhy5B25JRQvgKFpJNLsLPgeygIKwx2NZLCbC/R5Tf2V85BPIf+P11AJ07mrzMX FAHolAlPVWdonyw1aPjheee4UmlMg5nk4LEx6LlvzW6qxQr3HSvakqH4KP9qkwdEazyD Ljwg== X-Gm-Message-State: AOJu0YwQQa4i9oSYDTMDH4e1vNi16ADS3HE4FvPlnPeeoQCQgfDlVFlS 9VkFL5dQaddpNe5aptUJCwyiu27cHlvwxQVzeVKKEmE+9TY3oKPoE4mxd/DB5UHTrhYf6XbyfLQ l9yt9MADAC7dtpMAD1KjXihnllDQBRsOAYjYk X-Gm-Gg: AY/fxX61ngGhrvLL5BnPlOM00cp9+OvRi20/blr4xTDgdNMLZq42faVInf/X4y+bAKt 3KRPfO9MNQd81+1x7VmhJWKSIQZpy+zXPO9dBuMuV/LxoBLCx5Kxs1FK30Aw1EPasye7dZX5uuX mCmLWcZCJWJruebqtd4Wouo2+Mfo+OcD0gXdyRQn53p6OerlBTL01I38/wSrURXvkbe95lOr58f BJb6ZsDML9oIEvhV0frl886o/I4YitwnYMqxJOxvbGQKP8gAXRHw+h3sFEl8GMXF0MO9Pvfvi/C W1Yqt7/e68eIfGv74rMEK6ofos+mmA== X-Received: by 2002:a05:690e:12cb:b0:648:f65d:49a7 with SMTP id 956f58d0204a3-64901b10e4fmr1370778d50.80.1768373884332; Tue, 13 Jan 2026 22:58:04 -0800 (PST) MIME-Version: 1.0 References: <89846.1768373231@sss.pgh.pa.us> In-Reply-To: <89846.1768373231@sss.pgh.pa.us> From: Balkrishna Pandey Date: Wed, 14 Jan 2026 12:27:54 +0530 X-Gm-Features: AZwV_QiAMiz9HlcHo3I86F_hu7gtJWXzfnEyvHO7XnBv56hXOjyFen0-DXL524Q Message-ID: Subject: Re: Docs: Clarify that SIGHUP/reload does not update all GUCs for existing sessions To: Tom Lane Cc: pgsql-docs@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000034afcf064853a11a" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000034afcf064853a11a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Tom, Thanks , that is a helpful framing, and I agree my first suggestion went too deep into GUC =E2=80=9Ccontext=E2=80=9D details and still didn=E2=80=99= 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 =E2=80= =9Cso that existing sessions also adopt the new values,=E2=80=9D namely that *all= * changed settings automatically take effect everywhere. Based on your explanation, I think the doc should state the behavior at the =E2=80=9Csource of active value=E2=80=9D 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 cli= ent command). - The main server process also propagates this signal to all currently running server processes. After completing any currently-executing comma= nd, existing sessions re-read postgresql.conf and will adopt changed values = for parameters where their active setting was coming from postgresql.conf. I= f a session=E2=80=99s active value was set from another source (for example,= a SET command or role/database settings), the session=E2=80=99s 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=E2=80=AFPM Tom Lane wrote= : > Balkrishna Pandey 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 no= t+ > > 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 > --00000000000034afcf064853a11a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hi Tom,

Thanks , that is a helpful framing, and I agree= my first suggestion went too deep into GUC =E2=80=9Ccontext=E2=80=9D detai= ls and still didn=E2=80=99t 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 =E2=80=9Cso that= existing sessions also adopt the new values,=E2=80=9D namely that all<= /em> changed settings automatically take effect everywhere.

Based on your explanation, I think the doc should stat= e the behavior at the =E2=80=9Csource of active value=E2=80=9D level:

  • On SIGHUP, backends re-read postgres= ql.conf

  • A backend will only se= e a changed value take effect if it was previously using the value from pos= tgresql.conf

  • If the active val= ue came from elsewhere (e.g., a SET in the session, ALTER ROLE/DATABASE, et= c.), then nothing changes in that session

  • Would something like the following be closer to the right leve= l of complexity?

    • The main serve= r process also propagates this signal to all currently running server proce= sses, 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 propa= gates this signal to all currently running server processes. After completi= ng any currently-executing command, existing sessions re-read postgresql.co= nf and will adopt changed values for parameters where their active setting = was coming from postgresql.conf. If a session=E2=80=99s active value was se= t from another source (for example, a SET command or role/database settings= ), the session=E2=80=99s behavior will not change.

    Does this phrasing align with what you had in mind? I appreciate your feedb= ack

    Thanks in advance!

    Regards,

    Balkrishna

    On Wed, Jan 14, 2026 at 12:17=E2=80=AFPM Tom Lane <tgl@sss.pgh.pa.us> wrote:
    <= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">Balkrishna Pandey <balkrishna.pan= dey@gmail.com> writes:
    > *Proposed wording (illustrative diff):*

    > *+ The main server process also propagates this signal to all currentl= y
    > running server processes.+ Existing sessions will adopt new values for=
    > parameters whose context allows changes at reload+ time (for example,<= br> > sighup). Parameters whose context is backend or superuser-backend do n= ot+
    > 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.=C2=A0 For example, it's also t= rue
    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.=C2=A0 If its
    source for the active value was something else, nothing changes.
    You can argue about whether "backend"-context GUCs are an excepti= on
    to that rule, but I think our statement in the docs should be
    about at that level of complexity.

    =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 regards, tom lane
    --00000000000034afcf064853a11a--