Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id D48426338A1 for ; Sun, 27 Dec 2009 20:16:46 -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 35896-07 for ; Mon, 28 Dec 2009 00:16:29 +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 15B4B632AC3 for ; Sun, 27 Dec 2009 20:16:35 -0400 (AST) Received: from alap2.localnet (unknown [81.163.101.249]) by mail.anarazel.de (Postfix) with ESMTPSA id C294C448003; Mon, 28 Dec 2009 01:16:32 +0100 (CET) From: Andres Freund To: Simon Riggs Subject: Re: Small locking bugs in hs Date: Mon, 28 Dec 2009 01:16:25 +0100 User-Agent: KMail/1.13.0 (Linux/2.6.33-rc2-andres-dirty; KDE/4.3.85; x86_64; ; ) Cc: pgsql-hackers@postgresql.org References: <200912272012.32556.andres@anarazel.de> <1261951809.18116.458.camel@ebony> In-Reply-To: <1261951809.18116.458.camel@ebony> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <200912280116.25771.andres@anarazel.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/2148 X-Sequence-Number: 152851 On Sunday 27 December 2009 23:10:09 Simon Riggs wrote: > On Sun, 2009-12-27 at 20:12 +0100, Andres Freund wrote: > > While unlikely to cause issues two new LWLockAcquire calls use the wrong > > locking mode. > > Patch attached. > It's important to explain why you think something is a bug, rather than > make that claim on its own. Youre right. My idea was that another SIGINT handler (e.g. normal client query cancel) is running while CONFLICT_MODE_FATAL is issued that might get ignored. Thus the fatal error might get ignored. But actually that was mostly my gut feeling - I am not really understanding the whole query cancellation process yet. (Its not exactly unlikely that my patch does not fix that though) I think that if under protection of a shared lock the protected objects gets altered, that definitely needs to be commented from my pov... In the reverse case its not as important but still a good idea. > However, I think I see a different issue with conflict handling, so > looking at this again was worthwhile, thanks. Will come back with more > over next few days. Cool. Andres