Re: PostgreSQL 8.0.6 crash - Mailing list pgsql-hackers

From Greg Stark
Subject Re: PostgreSQL 8.0.6 crash
Date
Msg-id 87k6c472hn.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: PostgreSQL 8.0.6 crash  (Stephen Frost <sfrost@snowman.net>)
Responses Re: PostgreSQL 8.0.6 crash
Re: PostgreSQL 8.0.6 crash
List pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:

> Unless I've missed something here, disabling the OOM killer doesn't
> really solve the problem here.  

Well in a way it does. Postgres would get an out-of-memory error from malloc
which it would handle properly and the world would be happy.

Except not quite, since I think an out of memory error still means that
backend exits instead of just that query failing. That means if you have an
application running such as apache then all subsequent transactions on that
connection fail too, instead of just the transaction that misbehaved.

And as the other poster mentioned, having Postgres use up every available byte
of memory isn't really very friendly to anything else running on the box.

It doesn't seem like a bad idea to have a max_memory parameter that if a
backend ever exceeded it would immediately abort the current transaction. That
would let an application continue operating normally after getting an error.

-- 
greg



pgsql-hackers by date:

Previous
From: Joachim Wieland
Date:
Subject: Re: [GENERAL] Sequences/defaults and pg_dump
Next
From: Tom Lane
Date:
Subject: Re: PostgreSQL 8.0.6 crash