logical replication empty transactions

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема logical replication empty transactions
Дата
Msg-id CAMkU=1yohp9-dv48FLoSPrMqYEyyS5ZWkaZGD41RJr10xiNo_Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: logical replication empty transactions  (Euler Taveira <euler@timbira.com.br>)
Список pgsql-hackers
After setting up logical replication of a slowly changing table using the built in pub/sub facility, I noticed way more network traffic than made sense.  Looking into I see that every transaction in that database on the master gets sent to the replica.  99.999+% of them are empty transactions ('B' message and 'C' message with nothing in between) because the transactions don't touch any tables in the publication, only non-replicated tables.  Is doing it this way necessary for some reason?  Couldn't we hold the transmission of 'B' until something else comes along, and then if that next thing is 'C' drop both of them?

There is a comment for WalSndPrepareWrite which seems to foreshadow such a thing, but I don't really see how to use it in this case.  I want to drop two messages, not one.
 
 * Don't do anything lasting in here, it's quite possible that nothing will be done
 * with the data.

This applies to all version which have support for pub/sub, including the recent commits to 13dev.

I've searched through the voluminous mailing list threads for when this feature was being presented to see if it was already discussed, but since every word I can think to search on occurs in virtually every message in the threads in some context or another, I didn't have much luck.

Cheers,

Jeff

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Proposal: Make use of C99 designated initialisers fornulls/values arrays
Следующее
От: Andrew Alsup
Дата:
Сообщение: Re: Re: SQL/JSON: functions