Re: 2-phase commit
От | Peter Eisentraut |
---|---|
Тема | Re: 2-phase commit |
Дата | |
Msg-id | Pine.LNX.4.44.0309292047430.24925-100000@peter.localdomain обсуждение исходный текст |
Ответ на | Re: 2-phase commit (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: 2-phase commit
|
Список | pgsql-hackers |
Tom Lane writes: > No. The real problem with 2PC in my mind is that its failure modes > occur *after* you have promised commit to one or more parties. In > multi-master, if you fail you know it before you have told the client > his data is committed. I have a book here which claims that the solution to the problems of 2-phase commit is 3-phase commit, which goes something like this: coordinator participant ----------- ----------- INITIAL INITIALprepare --> WAIT<-- vote commit READY (all voted commit)prepare-to-commit --> PRE-COMMIT<-- ready-to-commit PRE-COMMITglobal-commit --> COMMIT COMMIT If the coordinator fails and all participants are in state READY, they can safely decide to abort after some timeout. If some participant is already in state PRE-COMMIT, it becomes the new coordinator and sends the global-commit message. Details are left as an exercise. :-) -- Peter Eisentraut peter_e@gmx.net
В списке pgsql-hackers по дате отправления: