Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Two-Phase Commit (pgdog.dev)
3 points by levkk 4 months ago | hide | past | favorite | 2 comments


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


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: