Re: Trigger causes the server to crash with SEGV

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: vlad(at)crystalballinc(dot)com
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Trigger causes the server to crash with SEGV
Date: 2001-06-01 20:56:20
Message-ID: 8203.991428980@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I wrote:
> I tried it here. I don't get a crash; I get a rather long delay and
> then
> psql:vlad.sql:61: ERROR: Memory exhausted in AllocSetContextCreate(8192)

Some experimentation with other infinitely-recursive plpgsql functions
soon turned up a crash, however: spi.c was being sloppy about not
checking for a failure return from malloc(). I have repaired that,
as well as some other similar omissions elsewhere in the backend.
I can't be sure if that's the case that was biting you, however.

Someday we ought to mount a concerted effort to get rid of all direct
uses of malloc() and friends in the backend; they're too easy to misuse,
and there's no good reason not to funnel everything through palloc.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message J. Michael Caine 2001-06-03 05:05:21 REFERENCES fails on derived classes
Previous Message Tom Lane 2001-06-01 19:17:05 Re: Trigger causes the server to crash with SEGV