From: | Joshua Tolley <eggyknap(at)gmail(dot)com> |
---|---|
To: | Aidan Van Dyk <aidan(at)highrise(dot)ca> |
Cc: | Robert Treat <rob(at)xzilla(dot)net>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Sync Rep Design |
Date: | 2010-12-31 03:26:51 |
Message-ID: | 4d1d4d96.c605ec0a.1af2.ffffb7ef@mx.google.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Dec 30, 2010 at 03:24:09PM -0500, Aidan Van Dyk wrote:
> On Thu, Dec 30, 2010 at 3:07 PM, Robert Treat <rob(at)xzilla(dot)net> wrote:
>
> >> If primary crashes while commits are waiting for acknowledgement, those
> >> transactions will be marked fully committed if the primary database
> >> recovers, no matter how allow_standalone_primary is set.
> >
> > This seems backwards; if you are waiting for acknowledgement, wouldn't the
> > normal assumption be that the transactions *didnt* make it to any standby,
> > and should be rolled back ?
>
> This is the standard 2-phase commit problem. The primary server *has*
> committed it, it's fsync has returned, and the only thing keeping it
> from returning the commit to the client is that it's waiting on a
> synchronous "ack" from a slave.
<snip>
> 2) initiate fsync on the primary first
> - In this case, the slave is always slightly behind. If if your
> primary falls over, you don't give commit messages to the clients, but
> if it recovers, it might have committed data, and slaves will still be
> able to catch up.
>
> The thing is that currently, even without replication, #2 can happen.
For what little it's worth, I vote for this option, because it's a problem
that can already happen (as opposed to adding an entirely new type of problem
to the mix).
--
Joshua Tolley / eggyknap
End Point Corporation
http://www.endpoint.com
From | Date | Subject | |
---|---|---|---|
Next Message | Joachim Wieland | 2010-12-31 03:26:52 | Re: Snapshot synchronization, again... |
Previous Message | Joachim Wieland | 2010-12-31 03:15:57 | Re: Snapshot synchronization, again... |