Re: Synchronization levels in SR

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: "Simon Riggs" <simon(at)2ndquadrant(dot)com>, "Fujii Masao" <masao(dot)fujii(at)gmail(dot)com>, "Robert Haas" <robertmhaas(at)gmail(dot)com>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Synchronization levels in SR
Date: 2010-05-26 18:01:03
Message-ID: 4BFD1B8F0200002500031B2F@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:

>> Unless we have a transaction manager and do proper distributed
>> transactions, how do you avoid edge conditions like that?
>
> Yeah, I guess you can't. You can guarantee that a commit is
> always safely flushed first in the master, or in the standby, but
> without two-phase commit you can't guarantee atomicity. It's
> useful to know which behavior you get, though, so that you can
> take it into account in your failover procedure.

It strikes me that if you always write the commit for the master
first, there's at least a possibility of developing a heuristic for
getting a slave back in sync should the connection break. If you
randomly update zero to N slaves and then have a failure, I don't
see much hope.

-Kevin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2010-05-26 18:02:13 Re: Synchronization levels in SR
Previous Message Stephen Frost 2010-05-26 17:59:11 psql \? \daS