From: | shveta malik <shveta(dot)malik(at)gmail(dot)com> |
---|---|
To: | Nisha Moond <nisha(dot)moond412(at)gmail(dot)com> |
Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, shveta malik <shveta(dot)malik(at)gmail(dot)com> |
Subject: | Re: Fix slot synchronization with two_phase decoding enabled |
Date: | 2025-04-24 10:27:22 |
Message-ID: | CAJpy0uDU101gCpXoSvVn_6s2bg50Qp+Gvt6rt4ZqmuhffmMvsg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Apr 24, 2025 at 2:54 PM Nisha Moond <nisha(dot)moond412(at)gmail(dot)com> wrote:
>
> Please find the updated patch for Approach 3, which implements the
> idea suggested by Swada-san above.
>
Thank You for the patch.
1)
CreateDecodingContext:
if (ctx->twophase && !slot->data.two_phase)
{
+ /*
+ * Do not allow two-phase decoding for failover enabled slots.
+ *
+ * See comments atop the similar check in ReplicationSlotCreate() for
+ * a detailed reason.
+ */
+ if (slot->data.failover)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("cannot enable two-phase decoding for failover enabled slot \"%s\"",
+ NameStr(slot->data.name))));
+
Can you please add tetscase to cover this scenario?
2)
We shall update create-sub documents as well for these mutually
exclusive options. Review other pages (alter-sub, create-slot) as well
for any required change.
3)
+##################################################
+# Test that the failover option can be enabled for a two_phase enabled
+# subscription.
+##################################################
Suggestion: 'Test that the failover option can be enabled for a two_phase
enabled subscription only through Alter Subscription (failover=true)'
thanks
Shveta
From | Date | Subject | |
---|---|---|---|
Next Message | vignesh C | 2025-04-24 10:29:46 | Re: Logical Replication of sequences |
Previous Message | Christoph Berg | 2025-04-24 10:21:06 | Re: extension_control_path and "directory" |