Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id F11F49FBFAE for ; Thu, 17 May 2007 10:52:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 55380-01 for ; Thu, 17 May 2007 10:52:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from joshua.dreamthought.com (joshua.dreamthought.com [193.201.200.96]) by postgresql.org (Postfix) with ESMTP id 9BC669FBF8C for ; Thu, 17 May 2007 10:52:23 -0300 (ADT) Received: from rafiq (helo=localhost) by joshua.dreamthought.com with local-esmtp (Exim 4.66 ()) (envelope-from ) id 1HogRE-000ImT-DU; Thu, 17 May 2007 14:54:40 +0100 Date: Thu, 17 May 2007 14:54:40 +0100 (BST) From: Raf To: Tom Lane cc: pgsql-admin@postgresql.org Subject: Re: Manual trigger removal [WAS] Flushing Postgres Function Cache In-Reply-To: <23181.1179409363@sss.pgh.pa.us> Message-ID: <20070517145059.W69332@joshua.dreamthought.com> References: <20070517092853.R69332@joshua.dreamthought.com> <20070517122322.V69332@joshua.dreamthought.com> <20070517131522.T69332@joshua.dreamthought.com> <20070517135952.F69332@joshua.dreamthought.com> <23181.1179409363@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: rafiq@joshua.dreamthought.com X-SA-Exim-Scanned: No (on joshua.dreamthought.com); SAEximRunCond expanded to false X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/163 X-Sequence-Number: 25483 Hi Tom, Thanks for the feedback. On Thu, 17 May 2007, Tom Lane wrote: > Raf writes: >> The final step was the decrement the reltriggers counter for the parent >> table's pg_class entry to 0. This appears to have resolved the problem. > > You should probably have set it to 3 not 0; what you did has disabled > *all* the triggers on that table. Is that really what you want? Even though there were 0 rows associated with the table's oid in pg_depend and pg_triggers ? Should this not be my indicator of the reltriggers count? For completeness, I ran a script we have which runs a bunch of alter tables, so that the schema returns to its natural state. I believe that this should fix any missing triggers, once the redundant trigger had been removed. Would you agree? Thanks, Raf