Re: Synchronization levels in SR - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Synchronization levels in SR
Date
Msg-id 4BFD595F.6070401@enterprisedb.com
Whole thread Raw
In response to Re: Synchronization levels in SR  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: Synchronization levels in SR
Re: Synchronization levels in SR
List pgsql-hackers
On 26/05/10 20:10, Kevin Grittner wrote:
> Heikki Linnakangas<heikki.linnakangas@enterprisedb.com>  wrote:
>
>> One way to do that would be to refrain from flushing the commit
>> record to disk on the master until the standby has acknowledged
>> it.
>
> I'm not clear on the benefit of doing that, versus flushing the
> commit record and then waiting for responses.  Either way some
> databases will commit before others -- what is the benefit of having
> the master lag?

Hmm, I was going to answer that that way no other transactions can see 
the transaction as committed before it has been safely replicated, but I 
now realize that you could also flush, but refrain from releasing the 
entry from procarray until the standby acknowledges the commit, so the 
transaction would look like in-progress to other transactions in the 
master until that.

Although, if the master crashes at that point, and quickly recovers, you 
could see the last transactions committed on the master before they're 
replicated to the standby.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Exposing the Xact commit order to the user
Next
From: Simon Riggs
Date:
Subject: Re: Synchronization levels in SR