Re: diagnosing a db crash - server exit code 2 - Mailing list pgsql-admin

From Tom Lane
Subject Re: diagnosing a db crash - server exit code 2
Date
Msg-id 23681.1317683445@sss.pgh.pa.us
Whole thread Raw
In response to Re: diagnosing a db crash - server exit code 2  (Joe Conway <mail@joeconway.com>)
Responses Re: diagnosing a db crash - server exit code 2
List pgsql-admin
Joe Conway <mail@joeconway.com> writes:
> On 10/03/2011 10:10 AM, Robert Burgholzer wrote:
>> FWIW - I am currently trying this while tracing the process that I
>> assume is the postmaster (/usr/bin/postgres -D /home/postgres/data),
>> since this process number indicates that it was recently restarted -
>> although the other PG processes, writer, wal writer, autovacuum, stats
>> collector all have their older pids indicating that they still survive.

> Sounds like you are attaching to the wrong process. Try something like
> the below...

No need to guess about it ... use "select pg_backend_pid();" and then
attach to that process.  (BTW, the "postmaster" is the parent process.
The one you want to debug is a backend.)

            regards, tom lane

pgsql-admin by date:

Previous
From: Scott Ribe
Date:
Subject: Re: commiting transaction from outside
Next
From: Tom Lane
Date:
Subject: Re: index bloat on partial index 8.4