Re: Logical replication and multimaster

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Logical replication and multimaster
Дата
Msg-id 20151209192824.GN28762@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: Logical replication and multimaster  (konstantin knizhnik <k.knizhnik@postgrespro.ru>)
Список pgsql-hackers
On 2015-12-03 09:54:23 +0300, konstantin knizhnik wrote:
> But right now performance of Multimaster is not limited by logical replication protocol - if I remove DTM and use
asynchronousreplication (lightweight version of BDR:)
 
> then I get 38k TPS instead of 12k.

My guess is that that's to a large degree because BDR 'batches' WAL
flushes / fsyncs over several connections. As the data is only applied
in one connection, whereas the primary can use multiple backends, it is
important no to constantly flush, as that's synchronous.

What I did for bdr was to register the 'desired' flush position whenever
replaying a commit (c.f. dlist_push_tail(&bdr_lsn_association,
&flushpos->node); in process_remote_commit()) and whenever feedback is
sent figure out how far the WAL actually has been flushed
(c.f. bdr_get_flush_position()).

Now that cannot trivially be done with 2PC, but it doesn't look all that
hard to change the 2PC API to allow at least some batching of the
fsyncs.

Greetings,

Andres Freund



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Logical replication and multimaster
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Re: Reusing abbreviated keys during second pass of ordered [set] aggregates