Draft back-branch release notes are up
... at
We have been busy lately, so these seem a good bit longer than
average. They could use closer review than usual.
As usual, please send comments/corrections by Sunday.
regards, tom lane
On Fri, Nov 6, 2026 at 2:47 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
As usual, please send comments/corrections by Sunday.
I noticed a couple of small issues for "Fix snapshot export and import
to work properly on a snapshot taken during recovery":
* The release notes should credit Bertrand Drouvot as an additional
author of the fix.
* Seems worth pointing out that this problem is associated with
running pg_dump with multiple jobs (--jobs=N) on a standby [1]/messages/by-id/17846-1a0e5ce976f4c01a@postgresql.org -- Peter Geoghegan. It
might also be worth mentioning that it requires the subxact cache on
the primary to overflow.
I am 100% sure that this bug has real world relevance (unlike all of
the other corruption bugs I worked on for this release). It hit at
least a handful of users, causing alarming misbehavior on affected
standbys. That's why I'm being particular about how it gets presented.
[1]: /messages/by-id/17846-1a0e5ce976f4c01a@postgresql.org -- Peter Geoghegan
--
Peter Geoghegan
Peter Geoghegan <pg@bowt.ie> writes:
I noticed a couple of small issues for "Fix snapshot export and import
to work properly on a snapshot taken during recovery":
Thanks for the note, will fix.
regards, tom lane
+ <para>
+ Depending on the plan shape selected, such cases could could produce
+ wrong results, or could fail with <quote>variable not found in
+ subplan target lists</quote>.
+ </para>
"could could" seems like an accidental duplication
+ <para>
+ Disallow <literal>NOT NULL NO INHERIT</literal> constraints on
+ partitioned tables (David Rowley, Nitin Motiani)
+ <ulink url="&commit_baseurl;35f60e5ce">§</ulink>
+ </para>
700b422af7e says the release note should mention more details:
It's probably unlikely that people have commonly done this, but the
release notes may wish to note that people should check if this has
happened to them...
+ <para>
+ Fix <application>pg_basebackup</application>'s incorrect progress
+ reporting for incremental backups (Daria Lepikhova)
+ <ulink url="&commit_baseurl;f47c63d7a">§</ulink>
+ </para>
+ </listitem>
This is a server side fix
+ <para>
+ Formerly <application>pg_dump</application> would
+ emit <literal>ALTER INDEX ... SET STATISTICS</literal> commands when
+ needed for plain indexes, but not for indexes created
+ via <literal>UNIQUE</literal> or <literal>PRIMARY KEY</literal>
+ syntax.
+ </para>
+ </listitem>
this only affects EXCLUDE constraints, because it can only be set on an expression columns. So maybe:
Formerly pg_dump would emit ALTER INDEX ... SET STATISTICS commands when needed for plain indexes, but not for the index underlying an EXCLUDE constraint.
Hi,
On Fri, Nov 06, 2026 at 02:47:52PM -0500, Tom Lane wrote:
... at
We have been busy lately, so these seem a good bit longer than
average. They could use closer review than usual.As usual, please send comments/corrections by Sunday.
+ Avoid resetting a replication
+ subscription's <literal>two_phase</literal> state to pending if it
+ is already enabled (Zhijie Hou)
We should also mention that:
This changes behavior when slot_name is altered together with SET
(two_phase = true) on an ENABLED subscription. Previously the state was
reset to PENDING and the apply worker enabled two_phase on the replacement
slot. Now the state stays ENABLED and the apply worker does not touch the
replacement slot's two_phase property.
It's in the commit message and was added to ensure it's in the release note,
see [1]/messages/by-id/CAA4eK1LQ1Y-J_O-Yau09DaYbBh0=5Honena2xHthA9kGVw+Yeg@mail.gmail.com.
[1]: /messages/by-id/CAA4eK1LQ1Y-J_O-Yau09DaYbBh0=5Honena2xHthA9kGVw+Yeg@mail.gmail.com
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
Zsolt Parragi <zsolt.parragi@percona.com> writes:
[ assorted comments ]
Thanks for the review! I adopted your changes, except for
700b422af7e says the release note should mention more details:
It's probably unlikely that people have commonly done this, but the
release notes may wish to note that people should check if this has
happened to them...
Yeah, I did read that text, and thought for a bit about how much of it
to include. The test query alone would have been fine, but without a
straightforward repair recipe, I'm not sure how useful it is. I don't
want to expend a large amount of note space on a problem that likely
affects very few people. Maybe we could stop at offering the ALTER
TABLE commands, and leave people to cope with finding any NULLs on
their own?
regards, tom lane
Bertrand Drouvot <bertranddrouvot.pg@gmail.com> writes:
On Fri, Nov 06, 2026 at 02:47:52PM -0500, Tom Lane wrote: + Avoid resetting a replication + subscription's <literal>two_phase</literal> state to pending if it + is already enabled (Zhijie Hou)
We should also mention that:
This changes behavior when slot_name is altered together with SET
(two_phase = true) on an ENABLED subscription. Previously the state was
reset to PENDING and the apply worker enabled two_phase on the replacement
slot. Now the state stays ENABLED and the apply worker does not touch the
replacement slot's two_phase property.
It's in the commit message and was added to ensure it's in the release note,
see [1].
Hmph. I read that and I was like "so what?". Why would users need
to know that? How likely is it that anyone would issue such a
combined command in the first place?
regards, tom lane
On Sun, 08 Nov 2026, Tom Lane <tgl@sss.pgh.pa.us> wrote:
The test query alone would have been fine, but without a
straightforward repair recipe, I'm not sure how useful it is. I don't
want to expend a large amount of note space on a problem that likely
affects very few people. Maybe we could stop at offering the ALTER
TABLE commands, and leave people to cope with finding any NULLs on
their own?
Yes, I think even the test query could be enough, and then simply mentioning that the constraint has to be fixed or dropped.
Zsolt Parragi <zsolt.parragi@percona.com> writes:
On Sun, 08 Nov 2026, Tom Lane <tgl@sss.pgh.pa.us> wrote:
The test query alone would have been fine, but without a
straightforward repair recipe, I'm not sure how useful it is. I don't
want to expend a large amount of note space on a problem that likely
affects very few people. Maybe we could stop at offering the ALTER
TABLE commands, and leave people to cope with finding any NULLs on
their own?
Yes, I think even the test query could be enough, and then simply
mentioning that the constraint has to be fixed or dropped.
OK, this is what I've got now:
<listitem>
<!--
Author: David Rowley <drowley@postgresql.org>
Branch: master [700b422af] 2026-10-27 19:46:12 +1300
Branch: REL_19_STABLE [a01d1a17e] 2026-10-27 19:46:42 +1300
Branch: REL_18_STABLE [35f60e5ce] 2026-10-27 19:47:09 +1300
-->
<para>
Disallow <literal>NOT NULL NO INHERIT</literal> constraints on
partitioned tables (David Rowley, Nitin Motiani)
<ulink url="&commit_baseurl;35f60e5ce">§</ulink>
</para>
<para>
This was already rejected by plain <command>CREATE TABLE</command>,
but cases such as <command>CREATE TABLE LIKE</command> missed
checking copied constraints, potentially allowing a partition to
contain null values when it should not.
</para>
<para>
If you suspect this might have happened in your database, issue this
command to find broken constraints:
<programlisting>
SELECT conrelid::regclass, conname
FROM pg_constraint
WHERE contype = 'n' AND connoinherit
AND conrelid IN (SELECT oid FROM pg_class WHERE relkind = 'p');
</programlisting>
Unwanted constraints can be removed with <literal>ALTER TABLE
... DROP CONSTRAINT ...</literal>, while ones that are wanted should
be repaired with <literal>ALTER TABLE ... ALTER CONSTRAINT
... INHERIT</literal>. The latter command will fail if any null
values are present in the table's partitions.
</para>
</listitem>
regards, tom lane
On Sun, Nov 8, 2026 at 9:37 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Bertrand Drouvot <bertranddrouvot.pg@gmail.com> writes:
On Fri, Nov 06, 2026 at 02:47:52PM -0500, Tom Lane wrote: + Avoid resetting a replication + subscription's <literal>two_phase</literal> state to pending if it + is already enabled (Zhijie Hou)We should also mention that:
This changes behavior when slot_name is altered together with SET
(two_phase = true) on an ENABLED subscription. Previously the state was
reset to PENDING and the apply worker enabled two_phase on the replacement
slot. Now the state stays ENABLED and the apply worker does not touch the
replacement slot's two_phase property.It's in the commit message and was added to ensure it's in the release note,
see [1].Hmph. I read that and I was like "so what?". Why would users need
to know that? How likely is it that anyone would issue such a
combined command in the first place?
I agree that it is less likely for users to use such a combination and
even if they use I don't think it is a big deal. We can leave
mentioning anything about such a combination.
--
With Regards,
Amit Kapila.
Amit Kapila <amit.kapila16@gmail.com> writes:
On Sun, Nov 8, 2026 at 9:37 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Hmph. I read that and I was like "so what?". Why would users need
to know that? How likely is it that anyone would issue such a
combined command in the first place?
I agree that it is less likely for users to use such a combination and
even if they use I don't think it is a big deal. We can leave
mentioning anything about such a combination.
To be clear, that was an honest request for information. I don't
understand why this point is worth space in the release notes.
But if you think it is, educate me. We still have a little time
to adjust the notes ...
regards, tom lane
On Mon, Nov 9, 2026 at 11:11 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Amit Kapila <amit.kapila16@gmail.com> writes:
On Sun, Nov 8, 2026 at 9:37 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Hmph. I read that and I was like "so what?". Why would users need
to know that? How likely is it that anyone would issue such a
combined command in the first place?I agree that it is less likely for users to use such a combination and
even if they use I don't think it is a big deal. We can leave
mentioning anything about such a combination.To be clear, that was an honest request for information. I don't
understand why this point is worth space in the release notes.
But if you think it is, educate me. We still have a little time
to adjust the notes ...
This was an unintended behavior (resetting slot's two_phase property
when user tries to mark two_phase for a subscription where two_phase
was already set) which was previously working and has the risk of the
same bugs as noted in the commit message. I don't know if in practice
any one would be using such a combination, so it is not clear to me if
there is a need to mention it in release notes. We can wait and see if
Bertrand has any thoughts on the same.
--
With Regards,
Amit Kapila.
Hi,
On Mon, Nov 09, 2026 at 11:34:12AM +0530, Amit Kapila wrote:
On Mon, Nov 9, 2026 at 11:11 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Amit Kapila <amit.kapila16@gmail.com> writes:
On Sun, Nov 8, 2026 at 9:37 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Hmph. I read that and I was like "so what?". Why would users need
to know that? How likely is it that anyone would issue such a
combined command in the first place?I agree that it is less likely for users to use such a combination and
even if they use I don't think it is a big deal. We can leave
mentioning anything about such a combination.To be clear, that was an honest request for information. I don't
understand why this point is worth space in the release notes.
But if you think it is, educate me. We still have a little time
to adjust the notes ...This was an unintended behavior (resetting slot's two_phase property
when user tries to mark two_phase for a subscription where two_phase
was already set) which was previously working and has the risk of the
same bugs as noted in the commit message. I don't know if in practice
any one would be using such a combination, so it is not clear to me if
there is a need to mention it in release notes. We can wait and see if
Bertrand has any thoughts on the same.
Even if this combination is uncommon, what worried me, is that a user relying on
the previous behavior would *silently* use the replacement slot without two phase
decoding. My thought was that mentioning this in the release notes would at least
make the behavior change less likely to go unnoticed.
Maybe we could shorten the sentence, something like:
"
Users issuing ALTER SUBSCRIPTION ... SET (slot_name = ..., two_phase = true) must
ensure that the replacement slot already has two_phase enabled, as the apply worker
no longer enables it automatically.
"
That said, if you and others don't think it is worth mentioning, I'm fine with
leaving it out (as the doc already describes that the replacement slot's
properties must match the subscription options).
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
Bertrand Drouvot <bertranddrouvot.pg@gmail.com> writes:
Maybe we could shorten the sentence, something like:
"
Users issuing ALTER SUBSCRIPTION ... SET (slot_name = ..., two_phase = true) must
ensure that the replacement slot already has two_phase enabled, as the apply worker
no longer enables it automatically.
"
Huh. That seems like a bug: you asked for two_phase = true and
didn't get it. I'm fine with an implementation restriction that
we won't change the two_phase property of an existing slot, but
shouldn't this command throw an error if what you asked for
doesn't match what the slot can do?
regards, tom lane
Hi,
On Mon, Nov 09, 2026 at 10:20:06AM -0500, Tom Lane wrote:
Bertrand Drouvot <bertranddrouvot.pg@gmail.com> writes:
Maybe we could shorten the sentence, something like:
"
Users issuing ALTER SUBSCRIPTION ... SET (slot_name = ..., two_phase = true) must
ensure that the replacement slot already has two_phase enabled, as the apply worker
no longer enables it automatically.
"Huh. That seems like a bug: you asked for two_phase = true and
didn't get it. I'm fine with an implementation restriction that
we won't change the two_phase property of an existing slot, but
shouldn't this command throw an error if what you asked for
doesn't match what the slot can do?
The current documentation [1]https://www.postgresql.org/docs/devel/sql-altersubscription.html says:
"
When altering the slot_name, the failover and two_phase property values of the
named slot may differ from the counterpart failover and two_phase parameters
specified in the subscription. When creating the slot, ensure the slot properties
failover and two_phase match their counterpart parameters of the subscription.
"
So the possibility of such a mismatch is documented, although I agree it is not
ideal.
The original doc warning was added after a discussion [2]/messages/by-id/flat/CAA4eK1Jd9dk=5POTKM9p4EyYqYzLXe-AnLzHrUELjzZScLz7mw@mail.gmail.com about failover, where
we chose documenting the limitation over adjusting the replacement slot at every
apply worker startup. The two_phase wording was added later because the same
mismatch was already possible.
I don't think we considered checking the replacement slot and reporting an error
on a mismatch. That would require connecting to the publisher and inspecting the
replacement slot, but it would certainly make the command less surprising.
So, I agree that reporting an error on a mismatch would be better. Amit, what do
you think? I can have a look at preparing a patch if we want to go that way.
[1]: https://www.postgresql.org/docs/devel/sql-altersubscription.html
[2]: /messages/by-id/flat/CAA4eK1Jd9dk=5POTKM9p4EyYqYzLXe-AnLzHrUELjzZScLz7mw@mail.gmail.com
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
On Mon, Nov 9, 2026 at 9:37 PM Bertrand Drouvot
<bertranddrouvot.pg@gmail.com> wrote:
On Mon, Nov 09, 2026 at 10:20:06AM -0500, Tom Lane wrote:
Bertrand Drouvot <bertranddrouvot.pg@gmail.com> writes:
Maybe we could shorten the sentence, something like:
"
Users issuing ALTER SUBSCRIPTION ... SET (slot_name = ..., two_phase = true) must
ensure that the replacement slot already has two_phase enabled, as the apply worker
no longer enables it automatically.
"Huh. That seems like a bug: you asked for two_phase = true and
didn't get it. I'm fine with an implementation restriction that
we won't change the two_phase property of an existing slot, but
shouldn't this command throw an error if what you asked for
doesn't match what the slot can do?The current documentation [1] says:
"
When altering the slot_name, the failover and two_phase property values of the
named slot may differ from the counterpart failover and two_phase parameters
specified in the subscription. When creating the slot, ensure the slot properties
failover and two_phase match their counterpart parameters of the subscription.
"So the possibility of such a mismatch is documented, although I agree it is not
ideal.The original doc warning was added after a discussion [2] about failover, where
we chose documenting the limitation over adjusting the replacement slot at every
apply worker startup. The two_phase wording was added later because the same
mismatch was already possible.I don't think we considered checking the replacement slot and reporting an error
on a mismatch. That would require connecting to the publisher and inspecting the
replacement slot, but it would certainly make the command less surprising.So, I agree that reporting an error on a mismatch would be better. Amit, what do
you think? I can have a look at preparing a patch if we want to go that way.
We can try but I feel manually setting up slots and subscriptions
correctly is also the user's responsibility, otherwise, user can rely
on the internally managed slots. For example, for this case, we need
to establish connection and query slot's data from the publisher which
we normally don't do, also what if connect=false, do we still try to
connect? It may add new restrictions.
--
With Regards,
Amit Kapila.
Hi,
On Tue, Nov 10, 2026 at 09:33:25AM +0530, Amit Kapila wrote:
We can try but I feel manually setting up slots and subscriptions
correctly is also the user's responsibility, otherwise, user can rely
on the internally managed slots. For example, for this case, we need
to establish connection and query slot's data from the publisher which
we normally don't do, also what if connect=false, do we still try to
connect? It may add new restrictions.
Thanks Amit and Tom. I've put some more thoughts and a possible approach in a
dedicated thread [1]/messages/by-id/avMmtxMsgqKy4IQq@bdtpg.
[1]: /messages/by-id/avMmtxMsgqKy4IQq@bdtpg
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com