Re: [BUGS] Out of memory error causes Abort, Abort tries to allocate memory

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [BUGS] Out of memory error causes Abort, Abort tries to allocate memory
Date: 2006-11-23 02:41:05
Message-ID: 7385.1164249665@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

I wrote:
> Jeff Davis <pgsql(at)j-davis(dot)com> writes:
>> Wasteful how? Do you mean that it would clutter the code, or that it
>> would cause unnecessary overhead?

> Well, it'd be an extra however-many-KB of memory for each backend that
> would mostly go unused. The rest of a backend's working memory pretty
> much pulls its weight, but a TransactionAbortContext wouldn't. OTOH,
> maybe these days a few dozen KB isn't worth worrying about.

After further thought I concluded that overloading ErrorContext for this
purpose is way too risky, so I've committed changes that create a
separate context for AbortTransaction to use:
http://archives.postgresql.org/pgsql-committers/2006-11/msg00199.php

I think the patch would apply cleanly to 8.1 but have not got time to
check it now. Less sure about older branches. Are we excited about
trying to back-patch this? I think it'd really need rather more testing
before I'd want to stick it into the stable branches ...

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2006-11-23 03:48:45 Re: Operator Classes and ANALYZE
Previous Message Ragnar 2006-11-22 21:26:27 Re: BUG #2772: Undefined Subroutine Pg::connectdb (" ");

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-11-23 03:03:54 Re: Day and month name localization uses wrong
Previous Message Andrew Dunstan 2006-11-22 22:23:43 Re: FKs + partial indexes?