| From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> | 
|---|---|
| To: | "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com> | 
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> | 
| Subject: | Re: Fix slot synchronization with two_phase decoding enabled | 
| Date: | 2025-04-02 04:40:44 | 
| Message-ID: | CAA4eK1JbLBeZfm7LHjsMipgTDrrzfmfxJKmurJqPkpfCQ9E41A@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On Tue, Apr 1, 2025 at 4:28 PM Zhijie Hou (Fujitsu)
<houzj(dot)fnst(at)fujitsu(dot)com> wrote:
>
> Here is the V3 patch set which addressed all the comments.
>
Comment 0n 0001
<literal>NULL</literal> for logical slots where
+       <structfield>two_phase</structfield> is false and physical slots.
+      </para></entry>
change above to:
<literal>NULL</literal> for logical slots where
<structfield>two_phase</structfield> is false and for physical slots.
Comment on 0002
+# Create a subscription with two_phase enabled
+$subscriber1->safe_psql('postgres',
+ "CREATE SUBSCRIPTION regress_mysub2 CONNECTION '$publisher_connstr'
PUBLICATION regress_mypub WITH (slot_name = lsub1_slot, create_slot =
false, enabled = false, two_phase = true);"
+);
+
+# Enable failover for the subscription
+($result, $stdout, $stderr) = $subscriber1->psql('postgres',
+ "ALTER SUBSCRIPTION regress_mysub2 SET (failover = true)");
+ok( $stderr =~ /ERROR:  cannot enable failover for a two_phase
enabled subscription/,
+ "Enabling failover is not allowed for a two_phase enabled subscription");
Is there a need for this test to be in .pl file? Can't we add it in .sql file?
Apart from the above, I have made minor modifications to the PG17
patch in the attached.
-- 
With Regards,
Amit Kapila.
| Attachment | Content-Type | Size | 
|---|---|---|
| v3-0002-amit.1.patch.txt | text/plain | 3.1 KB | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jeff Davis | 2025-04-02 05:44:19 | Re: Statistics Import and Export | 
| Previous Message | Peter Smith | 2025-04-02 04:10:34 | Re: CREATE SUBSCRIPTION - add missing test case |