Re: Logical replication and multimaster
От | Craig Ringer |
---|---|
Тема | Re: Logical replication and multimaster |
Дата | |
Msg-id | CAMsr+YGUMJ_w6E-bjJ0exZ80iaBPr16F6FRrB+RsZAvOE9KRUw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Logical replication and multimaster (Robert Haas <robertmhaas@gmail.com>) |
Список | pgsql-hackers |
On 3 December 2015 at 01:30, Robert Haas <robertmhaas@gmail.com> wrote:
-- 1. Do the transaction.
2. PREPARE.
3. Replay the transaction.
As Konstantin noted they aren't using Pg's 2PC. They actually couldn't if they wanted to because logical decoding does not support decoding an xact at PREPARE TRANSACTION time, without COMMIT PREPARED.
I'd love to change that and allow decoding at PREPARE TRANSACTION time - or streaming the xact from the start, as discussed in the prior mail. This would be a huge help for doing consensus operations on an otherwise asynchronous cluster, like making table structure changes. You'd decode the prepared xact, replay it, prepare it on all nodes, then commit prepared when all nodes confirm successful prepare.
IIRC the main issue with this is that the prepared xact continues to hold locks so logical decoding can't acquire the locks it needs to decode the xact.
В списке pgsql-hackers по дате отправления: