Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 7C58B1337B47 for ; Mon, 7 Mar 2011 05:20:23 -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 49888-01 for ; Mon, 7 Mar 2011 09:20:14 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail148161.authsmtp.com (outmail148161.authsmtp.com [62.13.148.161]) by mail.postgresql.org (Postfix) with ESMTP id 74CD51337BE0 for ; Mon, 7 Mar 2011 05:20:14 -0400 (AST) Received: from mail-c194.authsmtp.com (mail-c194.authsmtp.com [62.13.128.121]) by punt6.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id p279KB9i051908; Mon, 7 Mar 2011 09:20:11 GMT Received: from [192.168.0.3] ([81.5.146.37]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2) with ESMTP id p279K8wL046138; Mon, 7 Mar 2011 09:20:08 GMT Subject: Re: pgsql: Efficient transaction-controlled synchronous replication. From: Simon Riggs To: Fujii Masao Cc: pgsql-committers@postgresql.org In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Mon, 07 Mar 2011 09:20:07 +0000 Message-ID: <1299489607.1696.7933.camel@ebony> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Server-Quench: 18f51708-489c-11e0-80b9-0022640b883e X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdxZQATClZOTQEd DAteCiN5VAwpPBRK HVkIKg5MJUcNSQVJ NksadBtFaAJbYFhD HGQLWlVEUFR7W2N/ awMfZQRDZ1RPWwN0 U09WR1pVCwUmQR4G D2UWFWVycwNHe3Y+ Z05mVj5aVBJ/dEF9 SlNQHWRVeGZhPWAC WEAKfh5UcAFIeBtF OFh3VyZDAzANdhET OCoWHgwNEA9kHWxN TRoUKQBabEgFHzU9 ShYeVSk1FEseTi4v Lhsgb1UbGloLNUE2 PFdDEUkJNRQSEApY GFxWSDVUP10ATCM3 DARcGyYA X-Authentic-SMTP: 61633235383639.1015:706 X-AuthFastPath: 0 (Was 255) X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.719 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FS_REPLICA=3.599, RCVD_IN_DNSWL_LOW=-0.7, SARE_SPEC_REPLICA=0.72 X-Spam-Level: * X-Archive-Number: 201103/75 X-Sequence-Number: 44001 On Mon, 2011-03-07 at 17:27 +0900, Fujii Masao wrote: > On Mon, Mar 7, 2011 at 7:51 AM, Simon Riggs wrote: > And,, I found one bug ;) You seem to have wrongly removed the check > of max_wal_senders in SyncRepWaitForLSN. This can make the > backend wait for replication even if max_wal_senders = 0. I could produce > this problematic situation in my machine. The attached patch fixes this problem. There may be a bug, but that's not the fix. I spotted that issue myself in testing. I put in a protection to stop setting synchronous_standby_names if max_wal_senders is zero, with error message. Are you saying the committed version doesn't trigger that ERROR? -- Simon Riggs http://www.2ndQuadrant.com/books/ PostgreSQL Development, 24x7 Support, Training and Services