Re: logical replication empty transactions
Ajin Cherian <itsajin@gmail.com>
From: Ajin Cherian <itsajin@gmail.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: "osumi.takamichi@fujitsu.com" <osumi.takamichi@fujitsu.com>,
Peter Smith <smithpb2250@gmail.com>, vignesh C <vignesh21@gmail.com>, Michael Paquier <michael@paquier.xyz>, Rahila Syed <rahila.syed@2ndquadrant.com>,
Dilip Kumar <dilipbalaut@gmail.com>, Jeff Janes <jeff.janes@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>, Craig Ringer <craig@2ndquadrant.com>
Date: 2022-02-25T11:19:02Z
Lists: pgsql-hackers
Attachments
- v20-0001-Skip-empty-transactions-for-logical-replication.patch (application/octet-stream) patch v20-0001
On Fri, Feb 18, 2022 at 9:27 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > > Yeah, I think there could be multiple ways (a) We can send such a keep > alive in WalSndUpdateProgress() itself by using ctx->write_location. > For this, we need to modify WalSndKeepalive() to take sentPtr as > input. (b) set some flag in WalSndUpdateProgress() and then do it > somewhere in WalSndLoop probably in WalSndKeepaliveIfNecessary, or > maybe there is another better way. > Thanks for the suggestion Amit and Osumi-san, I experimented with both the suggestions but finally decided to use (a)Modifying WalSndKeepalive() to take an LSN optionally as input and passed in the ctx->write_location. I also verified that if I block the WalSndKeepalive() in WalSndWaitForWal, then my new code sends the keepalive when skipping transactions and the syncrep gets back feedback.. I will address comments from Peter and Wang in my next patch update. regards, Ajin Cherian Fujitsu Australia
Commits
-
Skip empty transactions for logical replication.
- d5a9d86d8ffc 15.0 landed
-
Add decoding of sequences to built-in replication
- 75b1521dae1f 15.0 cited
-
Allow specifying row filters for logical replication of tables.
- 52e4f0cd472d 15.0 cited