Re: Fix slot synchronization with two_phase decoding enabled
Nisha Moond <nisha.moond412@gmail.com>
From: Nisha Moond <nisha.moond412@gmail.com>
To: shveta malik <shveta.malik@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>,
Amit Kapila <amit.kapila16@gmail.com>, "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-05-07T11:06:41Z
Lists: pgsql-hackers
Attachments
- v13-0001-PG17-Approach-3-Fix-slot-synchronization-for-two.patch (application/x-patch) patch v13-0001
On Wed, May 7, 2025 at 10:32 AM shveta malik <shveta.malik@gmail.com> wrote: > > On Mon, May 5, 2025 at 3:29 PM Nisha Moond <nisha.moond412@gmail.com> wrote: > > > > Please find the v12 patch with above suggested changes. > > > > Thanks for the patch. Few comments for doc changes: > > 1) > func.sgml - pg_create_logical_replication_slot: > > + failover. The parameters <parameter>twophase</parameter> and > + <parameter>failover</parameter> cannot be enabled together when > + creating a replication slot. However, a slot created with > <parameter>twophase</parameter> > + enabled can later have <parameter>failover</parameter> set to true > + either using <command>ALTER_REPLICATION_SLOT</command> or via > + <command>ALTER SUBSCRIPTION</command> if a subscription is using this > + slot. > > Will it be better if we make a NOTE for this? Also can we create links for > <command>ALTER SUBSCRIPTION</command> and > <command>ALTER_REPLICATION_SLOT</command>? > > 2) > protocol.sgml: > > + The default is false. This option cannot be set together with > + <literal>failover</literal> when creating a logical replication slot. > + However, once the slot is created with <literal>two_phase = > true</literal>, > + <literal>failover</literal> can be set to true after the slot has > + consumed all the changes up to the point where two-phase decoding > + was enabled. > > Can we make a new paragraph for the new restriction added. Same for > other new restriction in this page. > > 3) > create_subscription.sgml: > > + cannot be enabled together when creating a subscription. However, a > + <literal>two_phase</literal> enabled subscription can later have > + <literal>failover</literal> set to true via <command>ALTER > SUBSCRIPTION</command>, > > via-->using > Attached is the v13 patch with the above comments addressed. -- Thanks, Nisha
Commits
-
Don't retreat slot's confirmed_flush LSN.
- ad5eaf390c58 18.0 landed
- 7318f241d29c 17.6 landed
- c0f51fde534d 16.10 landed
- 9d1a62359606 15.14 landed
- e68459489c20 14.19 landed
- e323d9df002d 13.22 landed
-
Fix assertion failure during decoding from synced slots.
- 3ff2a1f0c9e8 18.0 landed
-
Fix xmin advancement during fast_forward decoding.
- d65485b02b1f 13.21 landed
- aaf9e95e8764 18.0 landed
- 36148b22ee09 17.5 landed
- 21a7caeeb948 16.9 landed
- f6429bd7db5e 15.13 landed
- 1f63b3626a52 14.18 landed
-
Fix slot synchronization for two_phase enabled slots.
- 4868c96bc8c6 18.0 landed
-
Again match pg_user_mappings to information_schema.user_mapping_options.
- b6e39ca92eee 9.4.13 cited