pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Csaba Nagy <nagy@ecircle-ag.com>
Cc: Kris Jurka <books@ejurka.com>
Cc: Postgres JDBC <pgsql-jdbc@postgresql.org>
Subject: Re: out of memory error on a delete command
Date: Wed, 13 Jul 2005 09:50:29 -0400
Message-ID: <27576.1121262629@sss.pgh.pa.us> (raw)
In-Reply-To: <1121244446.3085.183.camel@coppola.muc.ecircle.de>
References: <1121165003.3085.165.camel@coppola.muc.ecircle.de>
	<Pine.BSO.4.56.0507121447080.8434@leary.csoft.net>
	<1121244446.3085.183.camel@coppola.muc.ecircle.de>

Csaba Nagy <nagy@ecircle-ag.com> 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



view thread (13+ messages)

Message-ID: <27576.1121262629@sss.pgh.pa.us>
Permalink:  ../27576.1121262629@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27576.1121262629@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: tgl@sss.pgh.pa.us, nagy@ecircle-ag.com, books@ejurka.com
  Subject: Re: out of memory error on a delete command
  In-Reply-To: <27576.1121262629@sss.pgh.pa.us>
  References: <1121165003.3085.165.camel@coppola.muc.ecircle.de> <Pine.BSO.4.56.0507121447080.8434@leary.csoft.net> <1121244446.3085.183.camel@coppola.muc.ecircle.de> <27576.1121262629@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox