Re: unchecked out of memory in postmaster.c

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: unchecked out of memory in postmaster.c
Date: 2009-04-07 01:19:55
Message-ID: 12474.1239067195@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Tom Lane wrote:
>> I guess I need to point out that those ereport calls already pose a far
>> more substantial risk of palloc failure than the DLNewElem represents.

> Hmm, do they? I mean, don't they use ErrorContext, which is supposed to
> be preallocated?

Well, we'd like to think that they pose an insignificant risk, but it's
hard to credit that DLNewElem isn't insignificant as well.

If you're really intent on doing something about this, my inclination
would be to get rid of the dependence on DLNewElem altogether. Add
a Dlelem field to the Backend struct and use DLInitElem (compare
the way catcache uses that module).

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-04-07 01:32:57 Re: Fix for psql \d tab completion
Previous Message Alvaro Herrera 2009-04-07 01:11:13 Re: unchecked out of memory in postmaster.c