Re: Sync Rep for 2011CF1 - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Sync Rep for 2011CF1
Date
Msg-id AANLkTi=SLjJUCWcj=2EUShOsv1+pGVZF-0_gQuvHJgev@mail.gmail.com
Whole thread Raw
In response to Re: Sync Rep for 2011CF1  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
On Fri, Jan 21, 2011 at 10:33 AM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> It's also possible that most of your transactions in fact do "set
> synchronous_replication=off", and only a few actually do synchronous
> replication. It would be pretty bad to not allow connections in that case.
> And what if you want to connect to the server to diagnose the issue? Oh, you
> can't... Besides, we're not kicking out existing connections, are we? Seems
> inconsistent to let the old connections live.
>
> IMHO the only reasonable option is to allow connections as usual, and only
> fail (or block forever) at COMMIT.

Another point is that the synchronous standby could come back at any
time.  There's no reason not to let the client do all the work they
want up until the commit - maybe the standby will pop back up before
the COMMIT actually issued.  Or even if it doesn't, as soon as it pops
back up, all those COMMITs get released.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: sepgsql contrib module
Next
From: Robert Haas
Date:
Subject: Re: More detailed auth info