RE: logical replication empty transactions - Mailing list pgsql-hackers

From houzj.fnst@fujitsu.com
Subject RE: logical replication empty transactions
Date
Msg-id OS0PR01MB5716BB24409D4B69206615B1941A9@OS0PR01MB5716.jpnprd01.prod.outlook.com
Whole thread Raw
In response to RE: logical replication empty transactions  ("houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>)
Responses Re: logical replication empty transactions  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Friday, March 25, 2022 8:31 AM houzj.fnst@fujitsu.com <houzj.fnst@fujitsu.com> wrote:
> On Thursday, March 24, 2022 11:19 AM houzj.fnst@fujitsu.com wrote:
> > On Tuesday, March 22, 2022 7:50 PM Amit Kapila
> <amit.kapila16@gmail.com>
> > wrote:
> > > On Tue, Mar 22, 2022 at 7:25 AM houzj.fnst@fujitsu.com
> > > <houzj.fnst@fujitsu.com> wrote:
> > > >
> > > > > On Monday, March 21, 2022 6:01 PM Amit Kapila
> > > > > <amit.kapila16@gmail.com>
> > > > > wrote:
> > > >
> > > > Oh, sorry, I posted the wrong patch, here is the correct one.
> > > >
> > >
> > > The test change looks good to me. I think additionally we can verify
> > > that the record is not reflected in the subscriber table. Apart from
> > > that, I had made minor changes mostly in the comments in the attached
> > > patch. If those look okay to you, please include those in the next version.
> >
> > Thanks, the changes look good to me, I merged the diff patch.
> >
> > Attach the new version patch which include the following changes:
> >
> > - Fix a typo
> > - Change the requestreply flag of the newly added WalSndKeepalive to false,
> >   because the subscriber can judge whether it's necessary to post a reply
> > based
> >   on the received LSN.
> > - Add a testcase to make sure there is no data in subscriber side when the
> >   transaction is skipped.
> > - Change the name of flag skipped_empty_xact to skipped_xact which seems
> > more
> >   understandable.
> > - Merge Amit's suggested changes.
> >
> 
> I did some more review for the newly added keepalive message and confirmed
> that it's necessary to send this in sync mode.

Since commit 75b1521 added decoding of sequence to logical 
replication, this patch needs to have send begin message in
pgoutput_sequence if necessary.

Attach the new version patch with this change.

Best regards,
Hou zj



Attachment

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: logical decoding and replication of sequences
Next
From: Bharath Rupireddy
Date:
Subject: Run end-of-recovery checkpoint in non-wait mode or skip it entirely for faster server availability?