Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id E93651337C0D for ; Wed, 20 Apr 2011 11:47:13 -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 37806-10 for ; Wed, 20 Apr 2011 14:47:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og114.obsmtp.com (exprod7og114.obsmtp.com [64.18.2.215]) by mail.postgresql.org (Postfix) with ESMTP id 81EB61337BDE for ; Wed, 20 Apr 2011 11:47:01 -0300 (ADT) Received: from mail-ew0-f45.google.com ([209.85.215.45]) (using TLSv1) by exprod7ob114.postini.com ([64.18.6.12]) with SMTP ID DSNKTa7x2vg6728Xeth0AAI/7oZitGc+0Hn4@postini.com; Wed, 20 Apr 2011 07:47:02 PDT Received: by ewy24 with SMTP id 24so266769ewy.32 for ; Wed, 20 Apr 2011 07:46:48 -0700 (PDT) Received: by 10.213.1.147 with SMTP id 19mr3176697ebf.116.1303310808066; Wed, 20 Apr 2011 07:46:48 -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 q53sm689035eeh.11.2011.04.20.07.46.46 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 20 Apr 2011 07:46:46 -0700 (PDT) Message-ID: <4DAEF1D4.2000203@enterprisedb.com> Date: Wed, 20 Apr 2011 17:46:44 +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: Tom Lane CC: Marko Tiikkaja , pgsql-bugs@postgresql.org, Kevin Grittner Subject: Re: BUG #5989: Assertion failure on UPDATE of big value References: <201104201411.p3KEBOfA009414@wwwmaster.postgresql.org> <26153.1303309604@sss.pgh.pa.us> In-Reply-To: <26153.1303309604@sss.pgh.pa.us> 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 X-Spam-Level: X-Archive-Number: 201104/146 X-Sequence-Number: 30065 On 20.04.2011 17:26, Tom Lane wrote: > "Marko Tiikkaja" writes: >> =# create table foo(a int[]); >> CREATE TABLE > >> =# insert into foo select array(select i from generate_series(1,10000) i); >> INSERT 0 1 > >> =# update foo set a = a||1; > >> TRAP: FailedAssertion("!(((bool) (((void*)(&(newTuple->t_self)) != ((void >> *)0))&& ((&(newTuple->t_self))->ip_posid != 0))))", File: "predicate.c", >> Line: 2282) > > Reproduced here. > Why is predicate.c getting called at all when transaction_isolation is > not SERIALIZABLE? (Although the same crash happens when it is ...) Because another serializable transaction that reads/updates the tuple later needs to find the predicate lock acquired by the first transaction, even if the transaction in the middle isn't serializable. It's unfortunate because it imposes a performance penalty to updates even if serializable transactions are not used. I don't think we ever measured the impact of this. :-( -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com