Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 9216A632558 for ; Sun, 10 Jan 2010 11:49:33 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 59853-06 for ; Sun, 10 Jan 2010 15:49:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail137146.authsmtp.com (outmail137146.authsmtp.com [62.13.137.146]) by mail.postgresql.org (Postfix) with ESMTP id 94EB963244E for ; Sun, 10 Jan 2010 11:49:22 -0400 (AST) Received: from mail-c187.authsmtp.com (mail-c187.authsmtp.com [62.13.128.33]) by punt9.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id o0AFn6XY062345; Sun, 10 Jan 2010 15:49:06 GMT Received: from [192.168.0.3] (88-110-134-25.dynamic.dsl.as9105.com [88.110.134.25]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id o0AFn1Jd077687; Sun, 10 Jan 2010 15:49:04 GMT Subject: Re: Small Bug in GetConflictingVirtualXIDs From: Simon Riggs To: Andres Freund Cc: pgsql-hackers@postgresql.org, Tom Lane , Alvaro Herrera In-Reply-To: <200912272011.27003.af@cybertec.de> References: <200912210402.37850.andres@anarazel.de> <200912220319.10264.af@cybertec.de> <1261478551.7442.4332.camel@ebony> <200912272011.27003.af@cybertec.de> Content-Type: text/plain Date: Sun, 10 Jan 2010 15:49:00 +0000 Message-Id: <1263138541.19367.142097.camel@ebony> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Content-Transfer-Encoding: 7bit X-Server-Quench: ae2e4b29-fdff-11de-ab46-001185d377ca X-Report-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdxZQATClZOTQEd DAteCiN5VAwpPBRK HVkIKg5MJUcNSQVJ NksachtFaQVbZ1hf HGQLWlREUVh7XWp/ aw4fZQ1DY0tOQQRp VFZLR01XHAJ3AVJe Bm9oDBgIIwVBf3h4 YghlWXdZEhUvdxN5 EExdCDtSMzF9aWFL BV0JJQdSbQNKfx5N bwR8U3ReMCtlM3Bw LC8aFBMcBw5qYB9Q SwUJZXgPTg4KGHYT SgwpGjMhGUwOWyQ1 ICInMEIBFUIhE2kp WQAy X-Authentic-SMTP: 61633235383639.1000:706/Kp X-AuthFastPath: 255 X-Virus-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=-2.422 tagged_above=-10 required=5 tests=AWL=0.177, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201001/1074 X-Sequence-Number: 154295 On Sun, 2009-12-27 at 20:11 +0100, Andres Freund wrote: > On Tuesday 22 December 2009 11:42:30 Simon Riggs wrote: > > On Tue, 2009-12-22 at 03:19 +0100, Andres Freund wrote: > > > On Monday 21 December 2009 16:48:52 Simon Riggs wrote: > > > > Giving the drop database a snapshot is not the answer. I expect Andres > > > > to be able to fix this with a simple patch that would not effect the > > > > case of normal running. > > > > > > Actually its less simply than I had thought at first - I don't think the > > > code ever handled that correctly. > > > I might be wrong there, my knowledge of the involved code is a bit > > > sparse... The whole conflict resolution builds on the concept of waiting > > > for an VXid, but an idle backend does not have a valid vxid. Thats > > > correct, right? > > I don't see any mileage in making Startup process wait for an idle > > session, so no real reason to wait for others either. > So here is a small patch implementing that behaviour. I've committed a slightly modified form of this patch. It was an outstanding bug, so delaying fix at this stage not worth it. I had in mind a slightly grander fix, but it's hardly a priority to polish the chrome on this one. Thanks for the bug report and fix. -- Simon Riggs www.2ndQuadrant.com