Re: Decoding of two-phase xacts missing from CREATE_REPLICATION_SLOT command

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: Jeff Davis <pgsql@j-davis.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>, Amit Kapila <akapila@postgresql.org>, Ajin Cherian <itsajin@gmail.com>, vignesh C <vignesh21@gmail.com>, Peter Smith <smithpb2250@gmail.com>
Date: 2021-06-04T03:06:26Z
Lists: pgsql-hackers
On Thu, Jun 3, 2021 at 10:08 PM Jeff Davis <pgsql@j-davis.com> wrote:
>
> On Thu, 2021-06-03 at 09:29 +0530, Amit Kapila wrote:
> > The idea is to support two_phase via protocol with a subscriber-side
> > work where we can test it as well. The code to support it via
> > replication protocol is present in the first patch of subscriber-side
> > work [1] which uses that code as well. Basically, we don't have a
> > good
> > way to test it without subscriber-side work so decided to postpone it
> > till the corresponding work is done.
>
> Thank you for clarifying.
>
> Right now, it feels a bit incomplete. If it's not much work, I
> recommend breaking out the CREATE_REPLICATION_SLOT changes and updating
> pg_recvlogical, so that it can go in v14 (and
> pg_create_logical_replication_slot() will match
> CREATE_REPLICATION_SLOT). But if that's complicated or controversial,
> then I'm fine waiting for the other work to complete.
>

I think we can try but not sure if we can get it by then. So, here is
my suggestion:
a. remove the change in CreateReplicationSlotCmd
b. prepare the patches for protocol change and pg_recvlogical. This
will anyway include the change we removed as part of (a).

Does that sound reasonable?

-- 
With Regards,
Amit Kapila.



Commits

  1. Remove two_phase variable from CreateReplicationSlotCmd struct.

  2. Add option to enable two_phase commits via pg_create_logical_replication_slot.