Thread

Commits

  1. Doc: Improve the wording of logical slot prerequisites.

  2. Doc: Add the steps for upgrading the logical replication cluster.

  1. Logical Replication upgrade

    The Post Office <noreply@postgresql.org> — 2026-04-13T15:06:27Z

    The following documentation comment has been logged on the website:
    
    Page: https://www.postgresql.org/docs/18/logical-replication-upgrade.html
    Description:
    
    Hello there,
    
    I don't know if it's me but I find this sentence quite confusing in its
    current wording:
    All slots on the old cluster must be usable, i.e., there are no slots whose
    pg_replication_slots.conflicting is not true.
    
    The prerequisite is that no replication slot has conflicting=true right?
    So this sentence (the i.e. part) suggests the opposite, as per my
    understanding.
    
    Here is the link (29.13.1):
    https://www.postgresql.org/docs/current/logical-replication-upgrade.html#STEPS-TWO-NODE-CIRCULAR-LOGICAL-REPLICATION-CLUSTER:~:text=there%20are%20no%20slots%20whose%20pg_replication_slots.conflicting%20is%20not%20true
    
    Thanks.
    Regards,
    
    
    
    
    
  2. Re: Logical Replication upgrade

    David G. Johnston <david.g.johnston@gmail.com> — 2026-04-15T15:55:20Z

    On Wed, Apr 15, 2026 at 7:52 AM PG Doc comments form <noreply@postgresql.org>
    wrote:
    
    > The following documentation comment has been logged on the website:
    >
    > Page: https://www.postgresql.org/docs/18/logical-replication-upgrade.html
    > Description:
    >
    > Hello there,
    >
    > I don't know if it's me but I find this sentence quite confusing in its
    > current wording:
    > All slots on the old cluster must be usable, i.e., there are no slots whose
    > pg_replication_slots.conflicting is not true.
    >
    > The prerequisite is that no replication slot has conflicting=true right?
    > So this sentence (the i.e. part) suggests the opposite, as per my
    > understanding.
    >
    > Here is the link (29.13.1):
    >
    > https://www.postgresql.org/docs/current/logical-replication-upgrade.html#STEPS-TWO-NODE-CIRCULAR-LOGICAL-REPLICATION-CLUSTER:~:text=there%20are%20no%20slots%20whose%20pg_replication_slots.conflicting%20is%20not%20true
    >
    >
    You are correct.  Usage of a double-negative should be avoided as a matter
    of style, but in this case it actually resolves to an untrue statement.
    
    https://github.com/postgres/postgres/commit/7fdeaf5774d05245e82632e763665ff62db5598e
    
    I've copied the committer for this.  Removing the "not" is simple enough;
    though writing in the negative sense, while good for an SQL where clause,
    does make reading in English more difficult.  Would rather say "all slots
    must be false" rather than "no slots can be true".  The next item regarding
    no persistent slots has the same complaint though it is factually correct
    as written.  Though NULL is a valid value here so maybe the negative
    phrasing is indeed necessary...
    
    David J.
    
  3. Re: Logical Replication upgrade

    Amit Kapila <amit.kapila16@gmail.com> — 2026-04-16T03:04:34Z

    On Wed, Apr 15, 2026 at 9:25 PM David G. Johnston
    <david.g.johnston@gmail.com> wrote:
    >
    > On Wed, Apr 15, 2026 at 7:52 AM PG Doc comments form <noreply@postgresql.org> wrote:
    >>
    >> The following documentation comment has been logged on the website:
    >>
    >> Page: https://www.postgresql.org/docs/18/logical-replication-upgrade.html
    >> Description:
    >>
    >> Hello there,
    >>
    >> I don't know if it's me but I find this sentence quite confusing in its
    >> current wording:
    >> All slots on the old cluster must be usable, i.e., there are no slots whose
    >> pg_replication_slots.conflicting is not true.
    >>
    >> The prerequisite is that no replication slot has conflicting=true right?
    >> So this sentence (the i.e. part) suggests the opposite, as per my
    >> understanding.
    >>
    >> Here is the link (29.13.1):
    >> https://www.postgresql.org/docs/current/logical-replication-upgrade.html#STEPS-TWO-NODE-CIRCULAR-LOGICAL-REPLICATION-CLUSTER:~:text=there%20are%20no%20slots%20whose%20pg_replication_slots.conflicting%20is%20not%20true
    >>
    >
    > You are correct.  Usage of a double-negative should be avoided as a matter of style, but in this case it actually resolves to an untrue statement.
    >
    > https://github.com/postgres/postgres/commit/7fdeaf5774d05245e82632e763665ff62db5598e
    >
    > I've copied the committer for this.  Removing the "not" is simple enough; though writing in the negative sense,
    >
    
    How about: "All slots on the old cluster must be usable, i.e., there
    are no slots whose pg_replication_slots.conflicting is false."?
    
    -- 
    With Regards,
    Amit Kapila.
    
    
    
    
  4. Re: Logical Replication upgrade

    David G. Johnston <david.g.johnston@gmail.com> — 2026-04-16T03:29:35Z

    On Wednesday, April 15, 2026, Amit Kapila <amit.kapila16@gmail.com> wrote:
    
    > On Wed, Apr 15, 2026 at 9:25 PM David G. Johnston
    > <david.g.johnston@gmail.com> wrote:
    > >
    > > On Wed, Apr 15, 2026 at 7:52 AM PG Doc comments form <
    > noreply@postgresql.org> wrote:
    > >>
    > >> The following documentation comment has been logged on the website:
    > >>
    > >> Page: https://www.postgresql.org/docs/18/logical-replication-
    > upgrade.html
    > >> Description:
    > >>
    > >> Hello there,
    > >>
    > >> I don't know if it's me but I find this sentence quite confusing in its
    > >> current wording:
    > >> All slots on the old cluster must be usable, i.e., there are no slots
    > whose
    > >> pg_replication_slots.conflicting is not true.
    > >>
    > >> The prerequisite is that no replication slot has conflicting=true right?
    > >> So this sentence (the i.e. part) suggests the opposite, as per my
    > >> understanding.
    > >>
    > >> Here is the link (29.13.1):
    > >> https://www.postgresql.org/docs/current/logical-
    > replication-upgrade.html#STEPS-TWO-NODE-CIRCULAR-
    > LOGICAL-REPLICATION-CLUSTER:~:text=there%20are%20no%20slots%
    > 20whose%20pg_replication_slots.conflicting%20is%20not%20true
    > >>
    > >
    > > You are correct.  Usage of a double-negative should be avoided as a
    > matter of style, but in this case it actually resolves to an untrue
    > statement.
    > >
    > > https://github.com/postgres/postgres/commit/
    > 7fdeaf5774d05245e82632e763665ff62db5598e
    > >
    > > I've copied the committer for this.  Removing the "not" is simple
    > enough; though writing in the negative sense,
    > >
    >
    > How about: "All slots on the old cluster must be usable, i.e., there
    > are no slots whose pg_replication_slots.conflicting is false."?
    >
    
    That is the same backwards outcome.  You only replaced “not true” with
    “false” (same meaning) but didn’t change the “no slots” phrasing.
    
    You can write either?
    
    No slots are true (conflicting)
    All slots are false (not conflicting)
    
    I prefer the second, and the fact your attempted fix didn’t actually fix
    things suggests that rephrasing both of these to “all slots are” is better.
    
    David J.
    
  5. Re: Logical Replication upgrade

    Amit Kapila <amit.kapila16@gmail.com> — 2026-04-16T05:13:52Z

    On Thu, Apr 16, 2026 at 8:59 AM David G. Johnston
    <david.g.johnston@gmail.com> wrote:
    >
    > On Wednesday, April 15, 2026, Amit Kapila <amit.kapila16@gmail.com> wrote:
    >>
    >> On Wed, Apr 15, 2026 at 9:25 PM David G. Johnston
    >> <david.g.johnston@gmail.com> wrote:
    >> >
    >> > On Wed, Apr 15, 2026 at 7:52 AM PG Doc comments form <noreply@postgresql.org> wrote:
    >> >>
    >> >> The following documentation comment has been logged on the website:
    >> >>
    >> >> Page: https://www.postgresql.org/docs/18/logical-replication-upgrade.html
    >> >> Description:
    >> >>
    >> >> Hello there,
    >> >>
    >> >> I don't know if it's me but I find this sentence quite confusing in its
    >> >> current wording:
    >> >> All slots on the old cluster must be usable, i.e., there are no slots whose
    >> >> pg_replication_slots.conflicting is not true.
    >> >>
    >> >> The prerequisite is that no replication slot has conflicting=true right?
    >> >> So this sentence (the i.e. part) suggests the opposite, as per my
    >> >> understanding.
    >> >>
    >> >> Here is the link (29.13.1):
    >> >> https://www.postgresql.org/docs/current/logical-replication-upgrade.html#STEPS-TWO-NODE-CIRCULAR-LOGICAL-REPLICATION-CLUSTER:~:text=there%20are%20no%20slots%20whose%20pg_replication_slots.conflicting%20is%20not%20true
    >> >>
    >> >
    >> > You are correct.  Usage of a double-negative should be avoided as a matter of style, but in this case it actually resolves to an untrue statement.
    >> >
    >> > https://github.com/postgres/postgres/commit/7fdeaf5774d05245e82632e763665ff62db5598e
    >> >
    >> > I've copied the committer for this.  Removing the "not" is simple enough; though writing in the negative sense,
    >> >
    >>
    >> How about: "All slots on the old cluster must be usable, i.e., there
    >> are no slots whose pg_replication_slots.conflicting is false."?
    >
    >
    > That is the same backwards outcome.  You only replaced “not true” with “false” (same meaning) but didn’t change the “no slots” phrasing.
    >
    
    Right, I got confused.
    
    > You can write either?
    >
    > No slots are true (conflicting)
    > All slots are false (not conflicting)
    >
    > I prefer the second, and the fact your attempted fix didn’t actually fix things suggests that rephrasing both of these to “all slots are” is better.
    >
    
    So, how about: "All slots on the old cluster must be usable, i.e.,
    their pg_replication_slots.conflicting is false."?
    
    -- 
    With Regards,
    Amit Kapila.
    
    
    
    
  6. Logical Replication upgrade

    David G. Johnston <david.g.johnston@gmail.com> — 2026-04-16T05:46:06Z

    On Wednesday, April 15, 2026, Amit Kapila <amit.kapila16@gmail.com> wrote:
    
    >
    > So, how about: "All slots on the old cluster must be usable, i.e.,
    > their pg_replication_slots.conflicting is false."?
    >
    
    That works.
    
    Then we’d also change:
    
    The new cluster must not have permanent logical slots, i.e., there must be
    no slots where pg_replication_slots.temporary is false.
    
    To be:
    
    “The new cluster is only permitted to have temporary logical slots, i.e.,
    ones where pg_replication_slots.temporary is true.”
    
    We could make it mirror the above one more closely, but as the former
    mentions the old cluster and the later the new one, I kinda like the
    different flow, less likely to skim over it.
    
    David J.
    
  7. Re: Logical Replication upgrade

    vignesh C <vignesh21@gmail.com> — 2026-04-16T07:09:09Z

    On Thu, 16 Apr 2026 at 11:16, David G. Johnston
    <david.g.johnston@gmail.com> wrote:
    >
    > On Wednesday, April 15, 2026, Amit Kapila <amit.kapila16@gmail.com> wrote:
    >>
    >>
    >> So, how about: "All slots on the old cluster must be usable, i.e.,
    >> their pg_replication_slots.conflicting is false."?
    >
    >
    > That works.
    >
    > Then we’d also change:
    >
    > The new cluster must not have permanent logical slots, i.e., there must be no slots where pg_replication_slots.temporary is false.
    >
    > To be:
    >
    > “The new cluster is only permitted to have temporary logical slots, i.e., ones where pg_replication_slots.temporary is true.”
    
    +1 for this, the attached patch has the changes for the same.
    
    Regards,
    Vignesh
    
  8. Re: Logical Replication upgrade

    Amit Kapila <amit.kapila16@gmail.com> — 2026-04-17T03:54:47Z

    On Thu, Apr 16, 2026 at 11:16 AM David G. Johnston
    <david.g.johnston@gmail.com> wrote:
    >
    > On Wednesday, April 15, 2026, Amit Kapila <amit.kapila16@gmail.com> wrote:
    >>
    >>
    >> So, how about: "All slots on the old cluster must be usable, i.e.,
    >> their pg_replication_slots.conflicting is false."?
    >
    >
    > That works.
    >
    > Then we’d also change:
    >
    > The new cluster must not have permanent logical slots, i.e., there must be no slots where pg_replication_slots.temporary is false.
    >
    > To be:
    >
    > “The new cluster is only permitted to have temporary logical slots, i.e., ones where pg_replication_slots.temporary is true.”
    >
    
    What you wrote is correct but it is better to keep what is not allowed
    for this case. Based on that, how about the following:
    "The new cluster must not have any permanent logical slots; i.e., any
    existing logical slots must have pg_replication_slots.temporary set to
    true."
    
    -- 
    With Regards,
    Amit Kapila.
    
    
    
    
  9. Re: Logical Replication upgrade

    David G. Johnston <david.g.johnston@gmail.com> — 2026-04-17T04:29:09Z

    On Thu, Apr 16, 2026 at 8:55 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
    
    > On Thu, Apr 16, 2026 at 11:16 AM David G. Johnston
    > <david.g.johnston@gmail.com> wrote:
    > >
    > > On Wednesday, April 15, 2026, Amit Kapila <amit.kapila16@gmail.com>
    > wrote:
    > >>
    > >>
    > >> So, how about: "All slots on the old cluster must be usable, i.e.,
    > >> their pg_replication_slots.conflicting is false."?
    > >
    > >
    > > That works.
    > >
    > > Then we’d also change:
    > >
    > > The new cluster must not have permanent logical slots, i.e., there must
    > be no slots where pg_replication_slots.temporary is false.
    > >
    > > To be:
    > >
    > > “The new cluster is only permitted to have temporary logical slots,
    > i.e., ones where pg_replication_slots.temporary is true.”
    > >
    >
    > What you wrote is correct but it is better to keep what is not allowed
    > for this case. Based on that, how about the following:
    > "The new cluster must not have any permanent logical slots; i.e., any
    > existing logical slots must have pg_replication_slots.temporary set to
    > true."
    >
    >
    I was like 51/49 for flipping that around, so sure.
    
    David J.
    
  10. Re: Logical Replication upgrade

    vignesh C <vignesh21@gmail.com> — 2026-04-17T05:32:16Z

    On Fri, 17 Apr 2026 at 09:25, Amit Kapila <amit.kapila16@gmail.com> wrote:
    >
    > On Thu, Apr 16, 2026 at 11:16 AM David G. Johnston
    > <david.g.johnston@gmail.com> wrote:
    > >
    > > On Wednesday, April 15, 2026, Amit Kapila <amit.kapila16@gmail.com> wrote:
    > >>
    > >>
    > >> So, how about: "All slots on the old cluster must be usable, i.e.,
    > >> their pg_replication_slots.conflicting is false."?
    > >
    > >
    > > That works.
    > >
    > > Then we’d also change:
    > >
    > > The new cluster must not have permanent logical slots, i.e., there must be no slots where pg_replication_slots.temporary is false.
    > >
    > > To be:
    > >
    > > “The new cluster is only permitted to have temporary logical slots, i.e., ones where pg_replication_slots.temporary is true.”
    > >
    >
    > What you wrote is correct but it is better to keep what is not allowed
    > for this case. Based on that, how about the following:
    > "The new cluster must not have any permanent logical slots; i.e., any
    > existing logical slots must have pg_replication_slots.temporary set to
    > true."
    
    Your version seems better, the attached v2 version patch has the
    changes for the same.
    
    Regards,
    Vignesh