Re: logical replication empty transactions
vignesh C <vignesh21@gmail.com>
From: vignesh C <vignesh21@gmail.com>
To: Ajin Cherian <itsajin@gmail.com>
Cc: Peter Smith <smithpb2250@gmail.com>,
Michael Paquier <michael@paquier.xyz>, Rahila Syed <rahila.syed@2ndquadrant.com>,
Euler Taveira <euler@timbira.com.br>, Amit Kapila <amit.kapila16@gmail.com>, Dilip Kumar <dilipbalaut@gmail.com>, Jeff Janes <jeff.janes@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>, Craig Ringer <craig@2ndquadrant.com>
Date: 2021-05-27T10:58:47Z
Lists: pgsql-hackers
On Tue, May 25, 2021 at 6:36 PM Ajin Cherian <itsajin@gmail.com> wrote: > > On Tue, Apr 27, 2021 at 1:49 PM Ajin Cherian <itsajin@gmail.com> wrote: > > Rebased the patch as it was no longer applying. Thanks for the updated patch, few comments: 1) I'm not sure if we could add some tests for skip empty transactions, if possible add a few tests. 2) We could add some debug level log messages for the transaction that will be skipped. 3) You could keep this variable below the other bool variables in the structure: + bool sent_begin_txn; /* flag indicating whether begin + * has already been sent */ + 4) You can split the comments to multi-line as it exceeds 80 chars + /* output BEGIN if we haven't yet, avoid for streaming and non-transactional messages */ + if (!data->sent_begin_txn && !in_streaming && transactional) + pgoutput_begin(ctx, txn); Regards, Vignesh
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