Re: Synchronization levels in SR

From: Markus Wanner <markus(at)bluegap(dot)ch>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Synchronization levels in SR
Date: 2010-09-07 17:50:48
Message-ID: 4C867B78.8080102@bluegap.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 09/07/2010 06:00 PM, Robert Haas wrote:
> People who are more concerned about performance than robustness aren't
> going to use sync rep in the first place.

I'm advocating sync (or eager, FWIW) replication for years, now. One of
the hardest preconception I'm always confronted with is: this must
perform poorly!

Whether or not that's true depends, but my point is: people who need
that level of robustness certainly care about performance as well.
Telling them to use async replication instead is not an option. (The
ability to mix sync and async replication per transaction is one, BTW).

> They're going to run it in
> async, which will improve performance by FAR more than you'll ever be
> able to manage by deciding that you don't care about handling some of
> the failure cases correctly.

Running in async and then trying to achieve the required level of
robustness in the application layer pretty certainly performs worse than
a good sync replication implementation. Async only wins if you really
don't care about the loss of transactions in the case of a failure. In
every other case, robustness is better taken care of by the database
system itself, IMO.

That being said, I certainly agree to do things step by step. And the
ability to write to WAL and wait for ack from a standby concurrently can
(and probably should) be considered an optimization, yes.

Regards

Markus Wanner

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Markus Wanner 2010-09-07 18:12:54 Re: Synchronization levels in SR
Previous Message Tom Lane 2010-09-07 17:30:54 Re: patch: tsearch - some memory diet