Re: logical replication empty transactions

Поиск
Список
Период
Сортировка
От Ajin Cherian
Тема Re: logical replication empty transactions
Дата
Msg-id CAFPTHDZS9O9WG02EfayBd6oONzK+qfUxS6AbVLJ7W+KECza2gg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: logical replication empty transactions  (Ajin Cherian <itsajin@gmail.com>)
Список pgsql-hackers
An earlier comment from Anders:
> We could e.g. have a new LogicalDecodingContext callback that is
> called whenever WalSndWaitForWal() would wait. That'd check if there's
> a pending "need" to send out a 'empty transaction'/feedback request
> message. The "need" flag would get cleared whenever we send out data
> bearing an LSN for other reasons.
>

I think the current Keep Alive messages already achieve this by
sending the current LSN as part of the Keep Alive messages.
    /* construct the message... */
    resetStringInfo(&output_message);
    pq_sendbyte(&output_message, 'k');
    pq_sendint64(&output_message, sentPtr); <=== Last sent WAL LSN
    pq_sendint64(&output_message, GetCurrentTimestamp());
    pq_sendbyte(&output_message, requestReply ? 1 : 0);

I'm not sure if anything more is required to keep empty transactions
updated as part of synchronous replicas. If my understanding on this
is not correct, let me know.

regards,
Ajin Cherian
Fujitsu Australia



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

Предыдущее
От: Ajin Cherian
Дата:
Сообщение: Re: logical replication empty transactions
Следующее
От: "tsunakawa.takay@fujitsu.com"
Дата:
Сообщение: RE: A test for replay of regression tests