X-Original-To: pgsql-hackers@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 48E934758E6 for ; Sat, 19 Apr 2003 16:58:04 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id A62FB4758C9 for ; Sat, 19 Apr 2003 16:58:03 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h3JKw2U6023462; Sat, 19 Apr 2003 16:58:03 -0400 (EDT) To: Stephan Szabo Cc: Kevin Brown , pgsql-hackers@postgresql.org Subject: Re: [PERFORM] Foreign key performance In-reply-to: <20030419114146.E18449-200000@megazone23.bigpanda.com> References: <20030419114146.E18449-200000@megazone23.bigpanda.com> Comments: In-reply-to Stephan Szabo message dated "Sat, 19 Apr 2003 12:03:02 -0700" Date: Sat, 19 Apr 2003 16:58:02 -0400 Message-ID: <23461.1050785882@sss.pgh.pa.us> From: Tom Lane X-Spam-Status: No, hits=-32.3 required=5.0 tests=BAYES_00,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,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/717 X-Sequence-Number: 38207 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)? > 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. regards, tom lane