Re: Standalone synchronous master - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Standalone synchronous master
Date
Msg-id 52CDC7D6.3020306@vmware.com
Whole thread Raw
In response to Re: Standalone synchronous master  (Andres Freund <andres@2ndquadrant.com>)
List 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



pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Standalone synchronous master
Next
From: Tom Lane
Date:
Subject: Re: Standalone synchronous master