Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 682E81337B39 for ; Sun, 2 Jan 2011 05:20:54 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 32447-07; Sun, 2 Jan 2011 09:20:47 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from cronos.madness.at (madness.at [217.196.146.217]) by mail.postgresql.org (Postfix) with ESMTP id 7727B133655C; Sun, 2 Jan 2011 05:20:46 -0400 (AST) Received: from gatekeeper.kaltenbrunner.cc ([83.215.243.9] helo=[192.168.8.22]) by cronos.madness.at with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1PZK7D-0006gw-Vn; Sun, 02 Jan 2011 10:20:42 +0100 Message-ID: <4D204367.4030308@kaltenbrunner.cc> Date: Sun, 02 Jan 2011 10:20:39 +0100 From: Stefan Kaltenbrunner User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101030 Iceowl/1.0b1 Icedove/3.0.10 MIME-Version: 1.0 To: Heikki Linnakangas CC: Josh Berkus , Simon Riggs , greg@2ndQuadrant.com, Hannu Krosing , Robert Haas , pgsql-hackers@postgresql.org Subject: Re: Sync Rep Design References: <1293729972.1892.23804.camel@ebony> <4D1CC47E.7050207@kaltenbrunner.cc> <1293735853.1892.24886.camel@ebony> <4D1D8B2F.5070001@2ndquadrant.com> <4D1DAB14.5000800@enterprisedb.com> <1293796137.1892.37313.camel@ebony> <4D1DCF5A.7070808@enterprisedb.com> <1293822959.1892.43164.camel@ebony> <4D1F332A.90306@kaltenbrunner.cc> <4D1FAD55.1090304@postgresql.org> <4D2038BB.7000504@enterprisedb.com> In-Reply-To: <4D2038BB.7000504@enterprisedb.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201101/52 X-Sequence-Number: 177889 On 01/02/2011 09:35 AM, Heikki Linnakangas wrote: > On 02.01.2011 00:40, Josh Berkus wrote: >> On 1/1/11 5:59 AM, Stefan Kaltenbrunner wrote: >>> well you keep saying that but to be honest I cannot really even see a >>> usecase for me - what is "only a random one of a set of servers is sync >>> at any time and I don't really know which one". >>> My usecases would al involved 2 sync standbys and 1 or more async ones. >>> but the second sync one would be in a different datacenter and I NEED to >>> protect against a datacenter failure which your proposals says I cannot >>> do :( >> >> As far as I know, *nobody* has written the bookkeeping code to actually >> track which standbys have ack'd. We need to get single-ack synch >> standby merged, tested and working before we add anything as complicated >> as "each standby on this list must ack". That means that it's extremely >> unlikely for 9.1 at this point. > > The bookkeeping will presumably consist of an XLogRecPtr in shared > memory for each standby, tracking how far the standby has acknowledged. > At commit, you scan the standby slots in shared memory and check that > the required standbys have acknowledged your commit record. The > bookkeeping required is the same whether or not we support a list of > standbys that must ack or just one. > >> Frankly, if Simon hadn't already submitted code, I'd be pushing for >> single-standby-only for 9.1, instead of "any one". > > Yes, we are awfully late, but let's not panic. > > BTW, there's a bunch of replication related stuff that we should work to > close, that are IMHO more important than synchronous replication. Like > making the standby follow timeline changes, to make failovers smoother, > and the facility to stream a base-backup over the wire. I wish someone > worked on those... yeah I agree that those two are much more of a problem for the general user base. Whatever people think about our current system - it is very easy to configure(in terms of knobs to toggle) but extremely hard to get set up and dealt with during failovers(and I know nobody who got it right the first few times or has not fucked up one thing in the process). Syncrep is importantant but I would argue that getting those two fixed is even more so ;) Stefan