From: | Ajin Cherian <itsajin(at)gmail(dot)com> |
---|---|
To: | Давыдов Виталий <v(dot)davydov(at)postgrespro(dot)ru> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Slow catchup of 2PC (twophase) transactions on replica in LR |
Date: | 2024-04-04 05:23:15 |
Message-ID: | CAFPTHDbU4EkVmKL66i5BzrmQ6LFftQPx_TZ1euKt9fvVzQDyjA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Mar 6, 2024 at 1:29 AM Давыдов Виталий <v(dot)davydov(at)postgrespro(dot)ru>
wrote:
> In usual work, the subscription has two_phase = on. I have to change this
> option at catchup stage only, but this parameter can not be altered. There
> was a patch proposal in past to implement altering of two_phase option, but
> it was rejected. I think, the recreation of the subscription with two_phase
> = off will not work.
>
>
>
The altering of two_phase was restricted because if there was a previously
prepared transaction on the subscriber when the two_phase was on, and then
it was turned off, the apply worker on the subscriber would re-apply the
transaction a second time and this might result in an inconsistent replica.
Here's a patch that allows toggling two_phase option provided that there
are no pending uncommitted prepared transactions on the subscriber for that
subscription.
Thanks to Kuroda-san for working on the patch.
regards,
Ajin Cherian
Fujitsu Australia
Attachment | Content-Type | Size |
---|---|---|
v1-0001-Allow-altering-of-two_phase-option-in-subscribers.patch | application/octet-stream | 7.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2024-04-04 05:26:29 | Re: Fix for timestamp lag issue from emit_log_hook when GUC log_line_prefix has '%m' |
Previous Message | Amit Kapila | 2024-04-04 05:18:11 | Re: Introduce XID age and inactive timeout based replication slot invalidation |