Re: [COMMITTERS] pgsql: Efficient transaction-controlled synchronous replication.
Markus Wanner <markus@bluegap.ch>
From: Markus Wanner <markus@bluegap.ch>
To: Greg Stark <gsstark@mit.edu>
Cc: Robert Haas <robertmhaas@gmail.com>, Simon Riggs <simon@2ndquadrant.com>, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>, Kevin Grittner <Kevin.Grittner@wicourts.gov>, MARK CALLAGHAN <mdcallag@gmail.com>, Alvaro Herrera <alvherre@commandprompt.com>, Andrew Dunstan <andrew@dunslane.net>, Aidan Van Dyk <aidan@highrise.ca>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2011-03-18T19:17:56Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Efficient transaction-controlled synchronous replication.
- a8a8a3e09652 9.1.0 cited
On 03/18/2011 06:35 PM, Greg Stark wrote: > I think promising that the COMMIT doesn't return until the transaction > and all previous transactions are replicated is enough. We don't have > to promise that nobody else will see it either. Those same > transactions eventually have to commit as well No, they don't have to. They can ROLLBACK, get aborted, lose connection to the master, etc.. The issue here is that, given the MySQL scheme, these transactions see a snapshot that's not durable, because at that point in time, no standby guarantees to have stored the transaction to be committed, yet. So in case of a failover, you'd suddenly see a different snapshot (and lose changes of that transaction). > This is akin to the synchronous_commit=off case where other > transactions can see your data as soon as you commit even before the > xlog is fsynced. If you have synchronous_commit mode enabled then > you'll block until your xlog is fsynced and that will implicitly mean > the other transactions you saw were also fsynced. Somewhat, yes. And for exactly that reason, most users run with synchronous_commit enabled. They don't want to lose committed transactions. Regards Markus Wanner