Re: ERROR: Memory exhausted in AllocSetAlloc(188)

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: ERROR: Memory exhausted in AllocSetAlloc(188)
Дата
Msg-id 200305222116.h4MLGfE08202@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: ERROR: Memory exhausted in AllocSetAlloc(188)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
FYI, TODO has:

    * Add deferred trigger queue file (Jan)

so it is a known issue.

---------------------------------------------------------------------------

Tom Lane wrote:
> "Jim C. Nasby" <jim@nasby.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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

В списке pgsql-general по дате отправления:

Предыдущее
От: "Corey W. Gibbs"
Дата:
Сообщение: ILIKE Problem?
Следующее
От: axel@pizza.home.kosnet.com (Axel Straschil)
Дата:
Сообщение: Pl/PgSql: Loop over Array