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-06 23:07:35
Message-ID: 23797.1239059255@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:
> Some time ago I noticed that in postmaster.c there's a corner case which
> probably causes postmaster to exit in out-of-memory condition. See
> BackendStartup, near the bottom, there's a call to DLNewElem(). The
> problem is that this function calls palloc() and thus can elog(ERROR) on
> OOM, but postmaster has no way to defend itself from this and would die.

So? There are probably hundreds of palloc calls that are reachable from
the postmaster main loop. If this were allocating more than a few bytes
of memory, it might be worth worrying about.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2009-04-06 23:20:39 Re: unchecked out of memory in postmaster.c
Previous Message Alvaro Herrera 2009-04-06 23:02:52 unchecked out of memory in postmaster.c