Re: Re: [COMMITTERS] pgsql: Efficient transaction-controlled synchronous replication.
Simon Riggs <simon@2ndquadrant.com>
From: Simon Riggs <simon@2ndQuadrant.com>
To: Aidan Van Dyk <aidan@highrise.ca>
Cc: Markus Wanner <markus@bluegap.ch>, 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>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2011-03-18T21:26:00Z
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 Fri, 2011-03-18 at 17:08 -0400, Aidan Van Dyk wrote: > On Fri, Mar 18, 2011 at 3:41 PM, Markus Wanner <markus@bluegap.ch> wrote: > > On 03/18/2011 08:29 PM, Simon Riggs wrote: > >> We could do that easily enough, actually, if we wished. > >> > >> Do we wish? > > > > I personally don't see any problem letting a standby show a snapshot > > before the master. I'd consider it unneeded network traffic. But then > > again, I'm completely biased. > > In fact, we *need* to have standbys show a snapshot before the master. > > By the time the master acks the commit to the client, the snapshot > must be visible to all client connected to both the master and the > syncronous slave. > > Even with just a single server postgresql cluster, other > clients(backends) can see the commit before the commiting client > receives the ACK. Just that on a single server, the time period for > that is small. > > Sync rep increases that time period by the length of time from when > the slave reaches the commit point in the WAL stream to when it's ack > of that point get's back to the wal sender. Ideally, that ACK time is > small. > > Adding another round trip in there just for a "go almost to $COMIT, > ok, now go to $COMMIT" type of WAL/ack is going to be pessimal for > performance, and still not improve the *guarentees* it can make. > > It can only slightly reduce, but not eliminated that window where them > master has WAL that the slave doesn't, and without a complete > elimination (where you just switch the problem to be the slave has the > data that the master doesn't), you haven't changed any of the > guarantees sync rep can make (or not). Well explained observation. Agreed. -- Simon Riggs http://www.2ndQuadrant.com/books/ PostgreSQL Development, 24x7 Support, Training and Services