From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | Ajin Cherian <itsajin(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Amit Kapila <akapila(at)postgresql(dot)org>, vignesh C <vignesh21(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com> |
Subject: | Re: Decoding of two-phase xacts missing from CREATE_REPLICATION_SLOT command |
Date: | 2021-06-09 11:57:35 |
Message-ID: | CAA4eK1JZU4ByJaW199LDuX4irH09VoryAZ7VyydhRZQxZtL7Sg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jun 9, 2021 at 4:50 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Wed, Jun 9, 2021 at 1:53 AM Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> >
> > On Tue, 2021-06-08 at 17:41 +1000, Ajin Cherian wrote:
> > > Here's an updated patchset that adds back in the option for two-phase
> > > in CREATE_REPLICATION_SLOT command and a second patch that adds
> > > support for
> > > two-phase decoding in pg_recvlogical.
> >
> > A few things:
> >
> > * I suggest putting the TWO_PHASE keyword after the LOGICAL keyword
> >
>
> Isn't it better to add it after LOGICAL IDENT? In docs [1], we expect
> that way. Also, see code in libpqrcv_create_slot where we expect them
> to be together but we can change that if you still prefer to add it
> after LOGICAL. BTW, can't we consider it to be part of
> create_slot_opt_list?
>
> Also, it might be good if we can add a test in
> src/bin/pg_basebackup/t/030_pg_recvlogical
>
Some more points:
1. pg_recvlogical can only send two_phase option if
(PQserverVersion(conn) >= 140000), otherwise, it won't work for older
versions of the server.
2. In the main patch [1], we do send two_phase option even during
START_REPLICATION for the very first time when the two_phase can be
enabled. There are reasons as described in the worker.c why we can't
enable it during CREATE_REPLICATION_SLOT. Now, if we want to do
protocol changes, I wonder why only do some changes and leave the rest
for the next version?
--
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | Abbas Butt | 2021-06-09 12:32:25 | Re: Logical replication keepalive flood |
Previous Message | Alexander Pyhalov | 2021-06-09 11:55:19 | Case expression pushdown |