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

From Euler Taveira
Subject Re: logical replication empty transactions
Date
Msg-id CAHE3wghivQ_27h3dktT2SA01nfSd8MPDpbqc7rbTGia=S_ppdg@mail.gmail.com
Whole thread Raw
In response to logical replication empty transactions  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: logical replication empty transactions  (Jeff Janes <jeff.janes@gmail.com>)
Re: logical replication empty transactions  (Dilip Kumar <dilipbalaut@gmail.com>)
List pgsql-hackers
Em seg., 21 de out. de 2019 às 21:20, Jeff Janes
<jeff.janes@gmail.com> escreveu:
>
> After setting up logical replication of a slowly changing table using the built in pub/sub facility, I noticed way
morenetwork traffic than made sense.  Looking into I see that every transaction in that database on the master gets
sentto the replica.  99.999+% of them are empty transactions ('B' message and 'C' message with nothing in between)
becausethe transactions don't touch any tables in the publication, only non-replicated tables.  Is doing it this way
necessaryfor some reason?  Couldn't we hold the transmission of 'B' until something else comes along, and then if that
nextthing is 'C' drop both of them? 
>
That is not optimal. Those empty transactions is a waste of bandwidth.
We can suppress them if no changes will be sent. test_decoding
implements "skip empty transaction" as you described above and I did
something similar to it. Patch is attached.


--
   Euler Taveira                                   Timbira -
http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Monitoring disk space from within the server
Next
From: Michael Paquier
Date:
Subject: Re: pg_upgrade fails with non-standard ACL