Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 9F9A8633DDE for ; Sun, 27 Dec 2009 16:20:17 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 67766-03 for ; Sun, 27 Dec 2009 20:20:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.anarazel.de (mail.anarazel.de [217.115.131.40]) by mail.postgresql.org (Postfix) with ESMTP id 64E68633B5A for ; Sun, 27 Dec 2009 16:20:10 -0400 (AST) Received: from alap2.localnet (unknown [81.163.101.249]) by mail.anarazel.de (Postfix) with ESMTPSA id E3DF7448005; Sun, 27 Dec 2009 21:20:07 +0100 (CET) From: Andres Freund To: pgsql-hackers@postgresql.org Subject: Re: Small Bug in GetConflictingVirtualXIDs Date: Sun, 27 Dec 2009 21:20:01 +0100 User-Agent: KMail/1.13.0 (Linux/2.6.33-rc2-andres-dirty; KDE/4.3.85; x86_64; ; ) Cc: Simon Riggs , Tom Lane , Alvaro Herrera References: <200912210402.37850.andres@anarazel.de> <200912272011.27003.af@cybertec.de> <1261944283.18116.24.camel@ebony> In-Reply-To: <1261944283.18116.24.camel@ebony> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <200912272120.02171.af@cybertec.de> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200912/2147 X-Sequence-Number: 152850 On Sunday 27 December 2009 21:04:43 Simon Riggs wrote: > 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. > > OK, thanks. I have also written something, as mentioned. Will review. Thats why I had asked in another mail ;-) But I have learned a bit more about pg while writing that patch so its fine for me at least ;-) Andres