Re: unchecked out of memory in postmaster.c - Mailing list pgsql-hackers

From Tom Lane
Subject Re: unchecked out of memory in postmaster.c
Date
Msg-id 23797.1239059255@sss.pgh.pa.us
Whole thread Raw
In response to unchecked out of memory in postmaster.c  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: unchecked out of memory in postmaster.c  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.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


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: unchecked out of memory in postmaster.c
Next
From: Alvaro Herrera
Date:
Subject: Re: unchecked out of memory in postmaster.c