Re: Core dumps, i.e. how to track down a problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: oberpwd(at)anubis(dot)network(dot)com (Wade D(dot) Oberpriller)
Cc: pgsql-general(at)postgresql(dot)org (general-help postgresql)
Subject: Re: Core dumps, i.e. how to track down a problem
Date: 2000-11-22 00:16:59
Message-ID: 5036.974852219@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

oberpwd(at)anubis(dot)network(dot)com (Wade D. Oberpriller) writes:
> Whenever I try to execute one of these functions, the postgres server
> process crashes. Does this process leave a core dump or some kind of
> trace to be able to learn more about what is happening? All it does
> now is report that the server process aborted with a status 11.

There should be a core file in the database subdirectory
($PGDATA/base/yourdbname/core). If you don't find one there, the
odds are that you started the postmaster with "ulimit -c 0" which
prevents coredumps. (Unfortunately, on some platforms this is the
default environment for anything started from a boot script.) Restart
the postmaster with "ulimit -c unlimited" and try again.

Once you have the core file, use gdb to get a backtrace:

gdb /path/to/postgres/executable /path/to/corefile
bt
quit

> Is there any extra flags to turn on, or compile with that could help?

The corefile will be more informative if you compiled with -g, but
a backtrace may be useful even without.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Patrick Robin 2000-11-22 00:37:34 backend dies when a user defined type returns null
Previous Message Tom Lane 2000-11-22 00:10:19 Re: Transaction, Rollback and Database Corruption question,