| From: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Draft back-branch release notes are up |
| Date: | 2026-11-09 16:07:22 |
| Message-ID: | avHvugFlXbqsm7BH@bdtpg |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Mon, Nov 09, 2026 at 10:20:06AM -0500, Tom Lane wrote:
> Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)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.
[1]: https://www.postgresql.org/docs/devel/sql-altersubscription.html
[2]: https://postgr.es/m/flat/CAA4eK1Jd9dk=5POTKM9p4EyYqYzLXe-AnLzHrUELjzZScLz7mw(at)mail(dot)gmail(dot)com#aa6428a6ba8d5f3244960df5666ab590
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Matheus Alcantara | 2026-11-09 16:30:55 | Re: [PATCH] doc: Fix description of relative extension "directory" setting |
| Previous Message | Greg Burd | 2026-11-09 15:57:48 | Re: nbtree: opt-in leaf key prefix compression |