Re: ERROR: invalid memory alloc request size <a_big_number_here>

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Matteo Beccati <php(at)beccati(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: ERROR: invalid memory alloc request size <a_big_number_here>
Date: 2005-10-27 13:18:41
Message-ID: 20051027131840.GH4259@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 27, 2005 at 08:54:57AM -0400, Bruce Momjian wrote:
> Martijn van Oosterhout wrote:
> -- Start of PGP signed section.
> > Belay that, you should be able to put a breakpoint on errstart or elog
> > or perhaps errmsg. Much easier...
> >
> > (I expected the find the answer in the developer FAQ, but it's not
> > there).
>
> I removed it because it used to be in the main FAQ, and wasn't asked
> "frequently". Should it be readded?

Hmm, depends. It's not asked often, that for sure. Yet everytime it
comes up I keep forgetting if I should be breaking on errstart, errmsg
or something else. One of these days I might just write it on a post-it
note next to my computer.

Maybe not as a seperate question, but in "2.8) What debugging features
are available?" add something like below. It'd be easier to point it
out to people on the web instead of saying it time.

- Additionally, if you get an unusual error message, it can be useful
- to get a stack trace to see how it got there. One trick is to attach
- gdb and tell it to break on elog and errstart/errmsg/errfinish
- (whichever is the right one) and you can get a stack trace at exactly
- the point it is dying. Note that DEBUG level message will trigger
- also so you might need to "cont" a few times to get the error you
- want.
--
Martijn van Oosterhout <kleptog(at)svana(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Matteo Beccati 2005-10-27 13:25:18 Re: ERROR: invalid memory alloc request size <a_big_number_here>
Previous Message Bruce Momjian 2005-10-27 13:06:34 Re: [HACKERS] expanded \df+ display broken in beta4