Re: logical replication empty transactions

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: logical replication empty transactions
Дата
Msg-id CAMsr+YF-Fx-X8uEsS3+G8WD5+iPx4cTX_HcJZ1L7hf7=kiOaWA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: logical replication empty transactions  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: logical replication empty transactions  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Mon, 2 Mar 2020 at 19:26, Amit Kapila <amit.kapila16@gmail.com> wrote:

> One thing that is not clear to me is how will we advance restart_lsn
> if we don't send any empty xact in a system where there are many such
> xacts?

Same way we already do it for writes that are not replicated over
logical replication, like vacuum work etc. The upstream sends feedback
with reply-requested. The downstream replies. The upstream advances
confirmed_flush_lsn, and that lazily updates restart_lsn.

The bigger issue here is that if you don't send empty txns on logical
replication you don't get an eager, timely response from the
replica(s), which delays synchronous replication. You need to send
empty txns when synchronous replication is enabled, or instead poke
the walsender to force immediate feedback with reply requested.


-- 
 Craig Ringer                   http://www.2ndQuadrant.com/
 2ndQuadrant - PostgreSQL Solutions for the Enterprise



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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Proposal: PqSendBuffer removal
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: [HACKERS] make async slave to wait for lsn to be replayed