Settings

Theme

Two-Phase Commit

docs.pgdog.dev

3 points by levkk 3 months ago · 2 comments

Reader

BinaryIgor 3 months ago

Usually there are not worth the complexity:

"Two-phase commit provides an eventual consistency guarantee only. While the transaction is committed, even if no errors occur, other clients will be able to see partial updates to the database cluster."

Plus, I wonder whether they have resilient mechanism to not hold transactions in the prepared state for too long, in case of crashes. In most cases, you can redesign your app/system to no require such complex things

  • levkkOP 3 months ago

    It's good to have some guarantee that a write is atomic and won't be left in a half-written state. I think that's strictly worse even if it's only "eventually" consistent. "Eventual" means within a couple milliseconds, really.

    > you can redesign your app/system

    You generally don't want to do that if you can avoid it. Also, easy to make a mistake there while 2pc is pretty deterministic.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection