pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: Simon Riggs <simon@2ndQuadrant.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Re: [COMMITTERS] pgsql: Efficient transaction-controlled synchronous replication.
Date: Mon, 07 Mar 2011 09:21:46 -0500
Message-ID: <4D74E9FA.7070202@dunslane.net> (raw)
In-Reply-To: <4D74E584.7080409@enterprisedb.com>
References: <E1PwMns-00047O-UU@gemulon.postgresql.org>
	<4D741441.2090704@dunslane.net>
	<1299454125.1696.6138.camel@ebony>
	<4D74896C.5030402@enterprisedb.com>
	<4D74DDFA.70800@dunslane.net>
	<4D74E584.7080409@enterprisedb.com>



On 03/07/2011 09:02 AM, Heikki Linnakangas wrote:
> On 07.03.2011 15:30, Andrew Dunstan wrote:
>> Previously, Simon said:
>>
>>> Truly "synchronous" requires two-phase commit, which this never was.
>>
>> So I too am confused about how it's now become "truly synchronous". Are
>> we saying this give the same or better guarantees than a 2PC setup?
>
> The guarantee we have now with synchronous_replication=on is that when 
> the server acknowledges a commit to the client (ie. when COMMIT 
> command returns), the transaction is safely flushed to disk on the 
> master and at least one synchronous standby server.
>
> What you don't get is a guarantee on what happens to transactions that 
> were not acknowledged to the client. For example, if you pull the 
> power plug, the transaction that was just being committed might be 
> committed on the master, but not yet on the standby.
>
> For me, that's enough to call it "synchronous replication". It 
> provides a useful guarantee to the client. But you could argue for an 
> even stricter definition, requiring atomicity so that if a transaction 
> is not successfully replicated for any reason, including crash, it is 
> rolled back in the master too. That would require 2PC.
>

My worry is that the stricter definition is what many people will 
expect, without reading the fine print.

cheers

andrew



view thread (85+ messages)  latest in thread

Message-ID: <4D74E9FA.7070202@dunslane.net>
Permalink:  ../4D74E9FA.7070202@dunslane.net/
Also on:    postgresql.org/message-id/4D74E9FA.7070202@dunslane.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: andrew@dunslane.net, heikki.linnakangas@enterprisedb.com, simon@2ndQuadrant.com, pgsql-hackers@postgresql.org
  Subject: Re: Re: [COMMITTERS] pgsql: Efficient transaction-controlled synchronous replication.
  In-Reply-To: <4D74E9FA.7070202@dunslane.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox