From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | jim(at)nasby(dot)net, Martijn van Oosterhout <kleptog(at)svana(dot)org>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: ERROR: Memory exhausted in AllocSetAlloc(188) |
Date: | 2003-05-22 21:16:41 |
Message-ID: | 200305222116.h4MLGfE08202@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
FYI, TODO has:
* Add deferred trigger queue file (Jan)
so it is a known issue.
---------------------------------------------------------------------------
Tom Lane wrote:
> "Jim C. Nasby" <jim(at)nasby(dot)net> writes:
> > On Wed, May 21, 2003 at 04:39:18PM -0400, Tom Lane wrote:
> >> Each pending deferred-trigger action takes about 40 bytes + palloc
> >> overhead, probably 48 bytes altogether ... 48 * 35M comes to 1.68G, so
> >> that's exactly where your problem is. I'd suggest trying to commit the
> >> changes in smaller batches ...
>
> > Ugh... would two triggers double that? Where can I get more info on
> > what's happening under the covers here, especially on what a deferred
> > trigger is?
>
> A deferred trigger is an AFTER trigger. If you can do your work in
> BEFORE triggers, you should.
>
> Two triggers firing on the same row action (insert/update/delete) do not
> double the memory --- there's one trigger queue entry per action. It
> looks like it costs about 8 more bytes for each additional deferred
> trigger that needs to be fired on the same row action.
>
> Beyond that, read the code --- it's in backend/commands/trigger.c.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Franco Bruno Borghesi | 2003-05-22 21:39:15 | dropped users |
Previous Message | Mark Wilson | 2003-05-22 20:50:37 | Re: PRIMARY KEYS |
From | Date | Subject | |
---|---|---|---|
Next Message | Kurt Roeckx | 2003-05-22 21:47:49 | Re: Missing EAI_ADDRFAMILY |
Previous Message | Bruce Momjian | 2003-05-22 21:14:47 | Win32 status |