Draft back-branch release notes are up
Draft back-branch release notes are up
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
... at https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=32973315d26b40225f592645c7526da7ab228531 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
Re: Draft back-branch release notes are up
От:
Peter Geoghegan <pg@bowt.ie>
Дата:
On Fri, Nov 6, 2026 at 2:47 PM Tom Lane 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]. 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] https://postgr.es/m/17846-1a0e5ce976f4c01a@postgresql.org -- Peter Geoghegan
Re: Draft back-branch release notes are up
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Peter Geoghegan 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
Re: Draft back-branch release notes are up
От:
Zsolt Parragi <zsolt.parragi@percona.com>
Дата:
+
+ Depending on the plan shape selected, such cases could could produce
+ wrong results, or could fail with variable not found in
+ subplan target lists.
+
"could could" seems like an accidental duplication
+
+ Disallow NOT NULL NO INHERIT constraints on
+ partitioned tables (David Rowley, Nitin Motiani)
+ §
+
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...
+
+ Fix pg_basebackup's incorrect progress
+ reporting for incremental backups (Daria Lepikhova)
+ §
+
+
This is a server side fix
+
+ Formerly pg_dump would
+ emit ALTER INDEX ... SET STATISTICS commands when
+ needed for plain indexes, but not for indexes created
+ via UNIQUE or PRIMARY KEY
+ syntax.
+
+
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.
Re: Draft back-branch release notes are up
От:
Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Дата:
Hi, On Fri, Nov 06, 2026 at 02:47:52PM -0500, Tom Lane wrote: > ... at > > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=32973315d26b40225f592645c7526da7ab228531 > > 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 two_phase 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]. [1]: https://postgr.es/m/CAA4eK1LQ1Y-J_O-Yau09DaYbBh0%3D5Honena2xHthA9kGVw%2BYeg%40mail.gmail.com Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
Re: Draft back-branch release notes are up
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Zsolt Parragi 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
Re: Draft back-branch release notes are up
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Bertrand Drouvot writes: > On Fri, Nov 06, 2026 at 02:47:52PM -0500, Tom Lane wrote: > + Avoid resetting a replication > + subscription's two_phase 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
Re: Draft back-branch release notes are up
От:
Zsolt Parragi <zsolt.parragi@percona.com>
Дата:
On Sun, 08 Nov 2026, Tom Lane 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.
Re: Draft back-branch release notes are up
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Zsolt Parragi writes:
> On Sun, 08 Nov 2026, Tom Lane 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:
Disallow NOT NULL NO INHERIT constraints on
partitioned tables (David Rowley, Nitin Motiani)
§
This was already rejected by plain CREATE TABLE,
but cases such as CREATE TABLE LIKE missed
checking copied constraints, potentially allowing a partition to
contain null values when it should not.
If you suspect this might have happened in your database, issue this
command to find broken constraints:
SELECT conrelid::regclass, conname
FROM pg_constraint
WHERE contype = 'n' AND connoinherit
AND conrelid IN (SELECT oid FROM pg_class WHERE relkind = 'p');
Unwanted constraints can be removed with ALTER TABLE
... DROP CONSTRAINT ..., while ones that are wanted should
be repaired with ALTER TABLE ... ALTER CONSTRAINT
... INHERIT. The latter command will fail if any null
values are present in the table's partitions.
regards, tom lane
Re: Draft back-branch release notes are up
От:
Amit Kapila <amit.kapila16@gmail.com>
Дата:
On Sun, Nov 8, 2026 at 9:37 PM Tom Lane wrote: > > Bertrand Drouvot writes: > > On Fri, Nov 06, 2026 at 02:47:52PM -0500, Tom Lane wrote: > > + Avoid resetting a replication > > + subscription's two_phase 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.
Re: Draft back-branch release notes are up
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Amit Kapila writes: > On Sun, Nov 8, 2026 at 9:37 PM Tom Lane 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
Re: Draft back-branch release notes are up
От:
Amit Kapila <amit.kapila16@gmail.com>
Дата:
On Mon, Nov 9, 2026 at 11:11 AM Tom Lane wrote: > > Amit Kapila writes: > > On Sun, Nov 8, 2026 at 9:37 PM Tom Lane 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.
Re: Draft back-branch release notes are up
От:
Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Дата:
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 wrote: > > > > Amit Kapila writes: > > > On Sun, Nov 8, 2026 at 9:37 PM Tom Lane 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
Re: Draft back-branch release notes are up
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Bertrand Drouvot 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
Re: Draft back-branch release notes are up
От:
Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Дата:
Hi, On Mon, Nov 09, 2026 at 10:20:06AM -0500, Tom Lane wrote: > Bertrand Drouvot 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. [1]: https://www.postgresql.org/docs/devel/sql-altersubscription.html [2]: https://postgr.es/m/flat/CAA4eK1Jd9dk=5POTKM9p4EyYqYzLXe-AnLzHrUELjzZScLz7mw@mail.gmail.com#aa6428a6ba8d5f3244960df5666ab590 Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
Re: Draft back-branch release notes are up
От:
Amit Kapila <amit.kapila16@gmail.com>
Дата:
On Mon, Nov 9, 2026 at 9:37 PM Bertrand Drouvot wrote: > > On Mon, Nov 09, 2026 at 10:20:06AM -0500, Tom Lane wrote: > > Bertrand Drouvot 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.
Re: Draft back-branch release notes are up
От:
Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Дата:
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]. [1]: https://postgr.es/m/avMmtxMsgqKy4IQq%40bdtpg Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com