Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 4B6331337B84 for ; Thu, 30 Dec 2010 23:27:28 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 69033-04-5 for ; Fri, 31 Dec 2010 03:27:20 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-yi0-f46.google.com (mail-yi0-f46.google.com [209.85.218.46]) by mail.postgresql.org (Postfix) with ESMTP id F22921337BD4 for ; Thu, 30 Dec 2010 23:27:19 -0400 (AST) Received: by yib18 with SMTP id 18so2408448yib.19 for ; Thu, 30 Dec 2010 19:27:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:cc :subject:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=I5wC7GzVhjyMD1RolH7wlor+NUuw5pF+yITCKsPDyk8=; b=XZer1sEX237KQ3DAixFgaP/Xv6uqokQmpMRhuOnBaDaZvfhdD8a3pGrrFP0Wna6TRK lCv0JjAP/TGr74/x21vmRTw5Q3jZbfzS0o2RpwJFLzDocEnDhxq1yEuFdCOUxaZAQDxd pZmNWkTz9WT8nIqw87T6sHbNMtVQZh+JYPo7c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:cc:subject:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=vHOcKb+rwaOn8G9GsLYVN18Jz+bYiz0cildyhB37b1Mfse+gFJlWDjZWJ5p/tjSQWz YnOTUKW9I1WBRa3GEbQaLYJI5FaKOrIVlO4QByDPVQ6+15heo5aqHL2L3LOod6p68KPL bUKM+RGVvFuSFSlxALYi3KjlBVC4Ia4sOxZvo= Received: by 10.90.115.17 with SMTP id n17mr1827559agc.145.1293766039675; Thu, 30 Dec 2010 19:27:19 -0800 (PST) Received: from eddie (c-67-186-249-122.hsd1.ut.comcast.net [67.186.249.122]) by mx.google.com with ESMTPS id 46sm9576529yhl.12.2010.12.30.19.27.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 30 Dec 2010 19:27:18 -0800 (PST) Message-ID: <4d1d4d96.c605ec0a.1af2.ffffb7ef@mx.google.com> Date: Thu, 30 Dec 2010 20:26:51 -0700 From: Joshua Tolley To: Aidan Van Dyk Cc: Robert Treat , Simon Riggs , Stefan Kaltenbrunner , pgsql-hackers@postgresql.org Subject: Re: Sync Rep Design References: <1293729972.1892.23804.camel@ebony> <4D1CC47E.7050207@kaltenbrunner.cc> <1293735853.1892.24886.camel@ebony> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Ublo+h3cBgJ33ahC" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.898 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RFC_ABUSE_POST=0.001 X-Spam-Level: X-Archive-Number: 201012/2527 X-Sequence-Number: 177789 --Ublo+h3cBgJ33ahC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 wrote: >=20 > >> 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 stand= by, > > and should be rolled back ? >=20 > 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. > 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. >=20 > 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 probl= em to the mix). -- Joshua Tolley / eggyknap End Point Corporation http://www.endpoint.com --Ublo+h3cBgJ33ahC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAk0dTXsACgkQRiRfCGf1UMO1rwCePJOecHDT/Bpjpd+Yc20CSosB EqQAoIcsxrB+H0BRJfJuyP5t1eAu2wR2 =2XpS -----END PGP SIGNATURE----- --Ublo+h3cBgJ33ahC--