Re: Postgresql Segfault in 8.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: lists(at)benjamindsmith(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgresql Segfault in 8.1
Date: 2006-01-25 15:52:11
Message-ID: 1048.1138204331@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Benjamin Smith <lists(at)benjamindsmith(dot)com> writes:
> What's the best way to do this? Take PG down (normally started as a service)
> and run directly in a single-user mode?

No, just start a psql session in one window, then in another window
determine the PID of the backend process it's connected to, and attach
gdb to that process. Something like

ps auxww | grep postgres:
... eyeball determination of correct PID ...
gdb /path/to/postgres-executable PID
gdb> continue

Now, in the psql window, do what's needed to provoke the crash. gdb
should trap at the instant of the segfault and give you another gdb>
prompt. Type "bt" to get the backtrace, then "q" to disconnect.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2006-01-25 15:56:04 Re: Alternative to knoda, kexi and rekall?
Previous Message Michelle Konzack 2006-01-25 15:43:18 Alternative to knoda, kexi and rekall?