Re: Standalone synchronous master

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Kevin Grittner <kgrittn(at)ymail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Simon Riggs <simon(at)2ndQuadrant(dot)com>, Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Standalone synchronous master
Date: 2014-01-08 21:49:10
Message-ID: 52CDC7D6.3020306@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01/08/2014 11:37 PM, Andres Freund wrote:
> On 2014-01-08 13:34:08 -0800, Kevin Grittner wrote:
>> On the other hand, we keep getting people saying they want the
>> database to make the promise of synchronous replication, and tell
>> applications that it has been successful even when it hasn't been,
>> as long as there's a line in the server log to record the lie.
>
> Most people having such a position I've talked to have held that
> position because they thought synchronous replication would mean that
> apply (and thus visibility) would also be synchronous.

And I totally agree that it would be a useful mode if apply was
synchronous. You could then build a master-standby pair where it's
guaranteed that when you commit a transaction in the master, it's
thereafter always seen as committed in the standby too. In that usage,
if the link between the two is broken, you could set up timeouts e.g so
that the standby stops accepting new queries after 20 seconds, and then
the master proceeds without the standby after 25 seconds. Then the
guarantee would hold.

I don't know if the people asking for the fallback mode are thinking
that synchronous replication means synchronous apply, or if they're
trying to have the cake and eat it too wrt. durability and availability.

Synchronous apply would be cool..

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-01-08 21:49:58 Re: Standalone synchronous master
Previous Message Joshua D. Drake 2014-01-08 21:44:31 Re: Standalone synchronous master