Re: ERROR: invalid memory alloc request size - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: ERROR: invalid memory alloc request size
Date
Msg-id 20051027131840.GH4259@svana.org
Whole thread Raw
In response to Re: ERROR: invalid memory alloc request size  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: ERROR: invalid memory alloc request size
List 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@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: Bruce Momjian
Date:
Subject: Re: ERROR: invalid memory alloc request size
Next
From: Matteo Beccati
Date:
Subject: Re: ERROR: invalid memory alloc request size