X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9AD4B52AC8 for ; Wed, 13 Jul 2005 10:50:34 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 35738-03 for ; Wed, 13 Jul 2005 13:50:28 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 0796552A35 for ; Wed, 13 Jul 2005 10:50:27 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j6DDoUEk027577; Wed, 13 Jul 2005 09:50:30 -0400 (EDT) To: Csaba Nagy Cc: Kris Jurka , Postgres JDBC Subject: Re: out of memory error on a delete command In-reply-to: <1121244446.3085.183.camel@coppola.muc.ecircle.de> References: <1121165003.3085.165.camel@coppola.muc.ecircle.de> <1121244446.3085.183.camel@coppola.muc.ecircle.de> Comments: In-reply-to Csaba Nagy message dated "Wed, 13 Jul 2005 10:47:26 +0200" Date: Wed, 13 Jul 2005 09:50:29 -0400 Message-ID: <27576.1121262629@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/67 X-Sequence-Number: 13215 Csaba Nagy writes: > This is interesting... we actually do have a trigger on that table which > inserts a record in a kind of archive table for each deleted record. I > actually forgot about this, good that you reminded me :-) > But then the TRUNCATE worked fine, and the table was actually truncated, > and I'm sure the trigger didn't kick in at all. Is this something > unexpected ? > The trigger itself is a BEFORE DELETE ... FOR EACH ROW trigger, and it's > not deferred. I've checked the table too where the trigger inserts, and > it had indeed a few records, but not as many as the original table had. > That could though come from previous runs... If it's a BEFORE trigger then the pending-trigger list isn't at issue. It sounds to me like the trigger function itself is doing something that leaks a little memory per firing. You could learn more by looking in the postmaster log: there should be a verbose report of memory context sizes put there at the time of the "out of memory" error report. regards, tom lane