Geoffrey wrote:
> Alvaro Herrera wrote:
> >Geoffrey wrote:
> >>It appears that upgrading to 7.4.13 helped the problem we were having
> >>with the postgres process terminating. We still are having the problem,
> >>but it does appear to be different, based on the output of backtraces.
> >>The core files are much larger and there does seem to be a common thread
> >>amongst most of them. I've attached one to see if anyone has any ideas
> >>as to what our problem might be. Suggestions would be appreciated.
> >
> >I don't think this backtrace makes much sense. Did you compile with
> >--enable-debug?
>
> It didn't make much sense to me either, but then, I'm not familiar with
> the postgres code. :( Is this a gcc flag? I did compile it with -g
> option, I don't see an --enable-debug in the gcc man page.
--enable-debug is a flag to "configure". It'll automatically add -g to
CFLAGS (I'm not sure if it does anything else, but it's easier than
specifying that yourself.)
> >Are you sure you are passing the same postgres executable to GDB that
> >was used to actually generate the core (i.e. the one that's running)?
> >Is this core file generated from exactly that executable, or is it maybe
> >one that was generated with an older executable?
>
> The core files were generated on a machine that does not have postgres
> compiled with debugging information, thus I built from source for the
> same version on another machine and ran gdb against it and the generated
> core file. I've done this in the past with different applications and
> was successful in debugging the core file. If you believe this is not
> generating an accurate trace, then I'll need to rebuild postgres on the
> production machine (which is not what I wanted to do).
I'm not 100% sure what you are saying here, but if it is what I believe,
then you didn't copy the newly compiled executable into the production
machine; that won't work. You need to use a debug-enabled executable
both to produce the core file, and to pass to GDB for inspection.
On the other hand, if you can reproduce the failure on the development
machine, that core file would serve just fine. (You'd only need to copy
the tables and relevant data from production to said machine).
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.