X-Original-To: pgsql-hackers@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9F19047580B for ; Sun, 20 Apr 2003 02:56:56 -0400 (EDT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id 265EE474E4F for ; Sun, 20 Apr 2003 02:56:56 -0400 (EDT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 83552D60D; Sat, 19 Apr 2003 23:56:56 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 790F45C03; Sat, 19 Apr 2003 23:56:56 -0700 (PDT) Date: Sat, 19 Apr 2003 23:56:56 -0700 (PDT) From: Stephan Szabo To: Tom Lane Cc: Kevin Brown , Subject: Re: [PERFORM] Foreign key performance In-Reply-To: <23461.1050785882@sss.pgh.pa.us> Message-ID: <20030419235530.S23637-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-26.6 required=5.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, QUOTE_TWICE_1,REPLY_WITH_QUOTES autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/721 X-Sequence-Number: 38211 On Sat, 19 Apr 2003, Tom Lane wrote: > Stephan Szabo writes: > > The hack was just the keeping around the list pointer from the last run > > through (see attached - passed simple fk tests and regression, but there > > might be problems I don't see). > > Shouldn't this patch update the comment in deferredTriggerInvokeEvents > (c. line 1860 in cvs tip)? Probably, since the second part of that is basically what this is. I'll update and send updated patch tomorrow. > > Looking at the code, I also wonder if we > > would get some gain by not allocating the per_tuple_context at the > > beginning but only when a non-deferred constraint is found since otherwise > > we're creating and destroying the context and possibly never using it. > > I doubt it's worth worrying over. Creation/destruction of a never-used > memory context is pretty cheap, I think. Okay, sounds good enough for me. :)