Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id CC04E1337C2D for ; Mon, 11 Apr 2011 15:00:45 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 29377-10 for ; Mon, 11 Apr 2011 18:00:35 +0000 (UTC) Received: from mx2.hub.org (mx2.hub.org [200.46.204.254]) by mail.postgresql.org (Postfix) with ESMTP id 1BDBE1337B69 for ; Mon, 11 Apr 2011 15:00:13 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og116.obsmtp.com (exprod7og116.obsmtp.com [64.18.2.219]) by mx2.hub.org (Postfix) with ESMTP id 27AD23EAE37B for ; Mon, 11 Apr 2011 11:55:21 -0300 (ADT) Received: from mail-ew0-f52.google.com ([209.85.215.52]) (using TLSv1) by exprod7ob116.postini.com ([64.18.6.12]) with SMTP ID DSNKTaMV/A+vUU2JPw/xCLOq3NJYhzKaD4ku@postini.com; Mon, 11 Apr 2011 07:55:23 PDT Received: by mail-ew0-f52.google.com with SMTP id 28so2146748ewy.39 for ; Mon, 11 Apr 2011 07:53:48 -0700 (PDT) Received: by 10.213.4.74 with SMTP id 10mr986726ebq.33.1302519685744; Mon, 11 Apr 2011 04:01:25 -0700 (PDT) Received: from [192.168.1.183] (dsl-hkibrasgw2-ff7ac300-240.dhcp.inet.fi [88.195.122.240]) by mx.google.com with ESMTPS id k51sm3659288eei.24.2011.04.11.04.01.23 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 11 Apr 2011 04:01:24 -0700 (PDT) Message-ID: <4DA2DF82.1090407@enterprisedb.com> Date: Mon, 11 Apr 2011 14:01:22 +0300 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.1.16) Gecko/20110307 Icedove/3.0.11 MIME-Version: 1.0 To: Dan Ports CC: pgsql-hackers@postgresql.org, YAMAMOTO Takashi , Kevin Grittner , Heikki Linnakangas Subject: Re: SSI bug? References: <4D8F54E6020000250003BD16@gw.wicourts.gov> <4D8F54E6020000250003BD16@gw.wicourts.gov> <20110328031616.CDAA719CEDF@mail.netbsd.org> <4D943BEC020000250003BFDA@gw.wicourts.gov> <20110403061644.GS81592@csail.mit.edu> In-Reply-To: <20110403061644.GS81592@csail.mit.edu> 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=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201104/630 X-Sequence-Number: 185832 On 03.04.2011 09:16, Dan Ports wrote: > I think I see what is going on now. We are sometimes failing to set the > commitSeqNo correctly on the lock. In particular, if a lock assigned to > OldCommittedSxact is marked with InvalidSerCommitNo, it will never be > cleared. > > The attached patch corrects this: > TransferPredicateLocksToNewTarget should initialize a new lock > entry's commitSeqNo to that of the old one being transferred, or take > the minimum commitSeqNo if it is merging two lock entries. > > Also, CreatePredicateLock should initialize commitSeqNo for to > InvalidSerCommitSeqNo instead of to 0. (I don't think using 0 would > actually affect anything, but we should be consistent.) > > I also added a couple of assertions I used to track this down: a > lock's commitSeqNo should never be zero, and it should be > InvalidSerCommitSeqNo if and only if the lock is not held by > OldCommittedSxact. > Thanks, committed this. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com