Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 2EA2E1337990 for ; Fri, 21 Jan 2011 08:45:36 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 71101-03 for ; Fri, 21 Jan 2011 12:45:29 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og125.obsmtp.com (exprod7og125.obsmtp.com [64.18.2.28]) by mail.postgresql.org (Postfix) with ESMTP id 2DC751337B53 for ; Fri, 21 Jan 2011 08:45:27 -0400 (AST) Received: from source ([209.85.215.49]) (using TLSv1) by exprod7ob125.postini.com ([64.18.6.12]) with SMTP ID DSNKTTl/5+kAu74+1Xz7HDbyGK36Vk7rd4e4@postini.com; Fri, 21 Jan 2011 04:45:29 PST Received: by mail-ew0-f49.google.com with SMTP id 20so927599ewy.22 for ; Fri, 21 Jan 2011 04:45:27 -0800 (PST) Received: by 10.213.26.7 with SMTP id b7mr825890ebc.29.1295613927178; Fri, 21 Jan 2011 04:45:27 -0800 (PST) Received: from [192.168.1.183] (dsl-hkibrasgw2-ff7ac300-240.dhcp.inet.fi [88.195.122.240]) by mx.google.com with ESMTPS id t5sm7467109eeh.14.2011.01.21.04.45.25 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 21 Jan 2011 04:45:26 -0800 (PST) Message-ID: <4D397FE4.2020709@enterprisedb.com> Date: Fri, 21 Jan 2011 14:45:24 +0200 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.1.15) Gecko/20101030 Icedove/3.0.10 MIME-Version: 1.0 To: Simon Riggs CC: pgsql-hackers@postgresql.org Subject: Re: Sync Rep for 2011CF1 References: <1295127631.3282.100.camel@ebony> In-Reply-To: <1295127631.3282.100.camel@ebony> 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=-4.2 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3 X-Spam-Level: X-Archive-Number: 201101/2066 X-Sequence-Number: 179903 (grr, I wrote this on Monday already, but just found it in my drafts folder, unsent) On 15.01.2011 23:40, Simon Riggs wrote: > > Here's the latest patch for sync rep. > >> From here, I will be developing the patch further on public git > repository towards commit. My expectation is that commit is at least 2 > weeks away, though there are no major unresolved problems. I expect > essential follow on patches to continue for a further 2-4 weeks after > that first commit. Thanks! Some quick observations after first read-through: * The docs for synchronous_replication still claim that it means two different things in master and standby. Looking at the code, I believe that's not true anymore. * it seems like overkill to not let clients to even connect when allow_standalone_primary=off and no synchronous standbys are available. What if you just want to run a read-only query? * Please separate the hot standby feedback loop into a separate patch on top of the synch rep patch. I know it's not a lot of code, but it's still easier to handle features separately. * The UI differs from what was agreed on here: http://archives.postgresql.org/message-id/4D1DCF5A.7070808@enterprisedb.com. * Instead of the short-circuit for autovacuum in SyncRepWaitOnQueue(), it's probably better to set synchronous_commit=off locally when the autovacuum process starts. * the "queue id" thing is dead code at the moment, as there is only one queue. I gather this is a leftover from having different queues for "apply", "sync", "write" modes, but I think it would be better to just remove it for now. PS, I'm surprised how small this patch is. Thinking about it some more, I don't know why I expected this to be a big patch. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com