Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 928DC1337BB0 for ; Thu, 24 Feb 2011 13:11:50 -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 99313-07 for ; Thu, 24 Feb 2011 17:11:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og123.obsmtp.com (exprod7og123.obsmtp.com [64.18.2.24]) by mail.postgresql.org (Postfix) with ESMTP id 7DF621337BA8 for ; Thu, 24 Feb 2011 13:11:42 -0400 (AST) Received: from source ([74.125.82.50]) (using TLSv1) by exprod7ob123.postini.com ([64.18.6.12]) with SMTP ID DSNKTWaRPyZ9UWm60zsVDwridybqQKyYzoC4@postini.com; Thu, 24 Feb 2011 09:11:42 PST Received: by wwb31 with SMTP id 31so983750wwb.19 for ; Thu, 24 Feb 2011 09:11:04 -0800 (PST) Received: by 10.227.72.129 with SMTP id m1mr1073006wbj.47.1298567463605; Thu, 24 Feb 2011 09:11:03 -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 y29sm1732464wbd.4.2011.02.24.09.11.01 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 24 Feb 2011 09:11:02 -0800 (PST) Message-ID: <4D669122.80904@enterprisedb.com> Date: Thu, 24 Feb 2011 19:10:58 +0200 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.1.16) Gecko/20101226 Icedove/3.0.11 MIME-Version: 1.0 To: Kevin Grittner CC: drkp@csail.mit.edu, yamt@mwd.biglobe.ne.jp, pgsql-hackers@postgresql.org Subject: Re: SSI bug? References: <4D6444B9020000250003AE98@gw.wicourts.gov> In-Reply-To: <4D6444B9020000250003AE98@gw.wicourts.gov> Content-Type: text/plain; charset=ISO-8859-1; 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: 201102/2186 X-Sequence-Number: 182975 On 23.02.2011 07:20, Kevin Grittner wrote: > Dan Ports wrote: > >> The obvious solution to me is to just keep the lock on both the old >> and new page. > > That's the creative thinking I was failing to do. Keeping the old > lock will generate some false positives, but it will be rare and > those don't compromise correctness -- they just carry the cost of > starting the transaction over. Sounds reasonable, but let me throw in another idea while we're at it: if there's a lock on the index page we're about to delete, we could just choose to not delete it. The next vacuum will pick it up. Presumably it will happen rarely, so index bloat won't be an issue. >> I was going to bemoan the extra complexity this would add -- but >> actually, couldn't we just replace PredicateLockPageCombine with a >> call to PredicateLockPageSplit since they'd now do the same thing? > > I'd be inclined to leave the external interface alone, in case we > conceive of an even better implementation. Agreed. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com