pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: Robert Burgholzer <rburghol@vt.edu>
Cc: Burgholzer, Robert (DEQ) <Robert.Burgholzer@deq.virginia.gov>
Cc: Scott Marlowe <scott.marlowe@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: diagnosing a db crash - server exit code 2
Date: Mon, 03 Oct 2011 10:28:47 -0700
Message-ID: <4E89F0CF.9080807@joeconway.com> (raw)
In-Reply-To: <CACT-NGJNW92jOFfp9N4u9APrmV0WjnJwg1ix37-yESWWSCDO2g@mail.gmail.com>
References: <B6C40D17104BEF47B1CB85623CDFAC6357BE26@COVMSGCES-EMB13.cov.virginia.gov>
	<4E7CDCA6.6060803@joeconway.com>
	<B6C40D17104BEF47B1CB85623CDFAC6357BE27@COVMSGCES-EMB13.cov.virginia.gov>
	<CAOR=d=3BoU+CRsOLVWY7a870cdQ2uc9KQcBA43cT-5J1_CKhow@mail.gmail.com>
	<B6C40D17104BEF47B1CB85623CDFAC6357BE2A@COVMSGCES-EMB13.cov.virginia.gov>
	<4E7CF42E.2050904@joeconway.com>
	<B6C40D17104BEF47B1CB85623CDFAC6357BE2F@COVMSGCES-EMB13.cov.virginia.gov>
	<CACT-NGKP07Ku5y7=JdOFDx+PYv-5w70CAv=N8yuc4w2HeSotHQ@mail.gmail.com>
	<4E84AB05.1050106@joeconway.com>
	<B6C40D17104BEF47B1CB85623CDFAC6302DD473B@COVMSGCES-EMB13.cov.virginia.gov>
	<CACT-NGJNW92jOFfp9N4u9APrmV0WjnJwg1ix37-yESWWSCDO2g@mail.gmail.com>

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...

Joe



Session #1: (connect to db and load PL/R)
-----------------
#psql contrib_regression
psql (9.2devel)
Type "help" for help.

contrib_regression=# load '$libdir/plr';
LOAD

Session #2: (use ps to find backend and attach)
-----------------
# ps -ef |grep postgres
postgres 17001     1  0 Sep24 ?        00:00:16
/usr/local/pgsql-head/bin/postgres -D /usr/local/pgsql-head/data -p 55437 -i
postgres 17006 17001  0 Sep24 ?        00:02:18 postgres: writer process

postgres 17007 17001  0 Sep24 ?        00:01:50 postgres: wal writer
process
postgres 17008 17001  0 Sep24 ?        00:00:37 postgres: autovacuum
launcher process
postgres 17009 17001  0 Sep24 ?        00:00:47 postgres: stats
collector process
postgres 26631 17001  0 10:22 ?        00:00:00 postgres: postgres
contrib_regression [local] idle

#gdb /usr/local/pgsql-head/bin/postgres 26631
(gdb) continue
Continuing.


Session #1: (run crashing function)
-----------------
run your PL/R function that causes the crash


-- 
Joe Conway
credativ LLC: http://www.credativ.us
Linux, PostgreSQL, and general Open Source
Training, Service, Consulting, & 24x7 Support



view thread (24+ messages)  latest in thread

Message-ID: <4E89F0CF.9080807@joeconway.com>
Permalink:  ../4E89F0CF.9080807@joeconway.com/
Also on:    postgresql.org/message-id/4E89F0CF.9080807@joeconway.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: mail@joeconway.com, rburghol@vt.edu, Robert.Burgholzer@deq.virginia.gov, scott.marlowe@gmail.com
  Subject: Re: diagnosing a db crash - server exit code 2
  In-Reply-To: <4E89F0CF.9080807@joeconway.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox