Re: PostgreSQL 8.0.6 crash - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: PostgreSQL 8.0.6 crash
Date
Msg-id 20060209215741.GH14852@svana.org
Whole thread Raw
In response to Re: PostgreSQL 8.0.6 crash  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PostgreSQL 8.0.6 crash
List pgsql-hackers
On Thu, Feb 09, 2006 at 02:35:34PM -0500, Tom Lane wrote:
> Greg Stark <gsstark@mit.edu> writes:
> > Except not quite, since I think an out of memory error still means that
> > backend exits instead of just that query failing.
>
> Not at all!  PG will recover from this perfectly well ... if it's given
> the opportunity, rather than being SIGKILLed.

FWIW, the problem is mainly from the situation where some process
accesses a piece of memory that has been swapped out, but there is no
memory available to swap the page in. Or write to a page marked
copy-on-write. What do you do? There's is no way to return -ENOMEM from
a normal memory access and PostgreSQL wouldn't handle that anyway.

When people talk about disabling the OOM killer, it doesn't stop the
SIGKILL behaviour, it just causes the kernel to return -ENOMEM for
malloc() much much earlier... (ie when you still actually have memory
available).

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Upcoming re-releases
Next
From: Tom Lane
Date:
Subject: Re: Upcoming re-releases