Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id ACB16B5DBD2 for ; Sun, 25 Sep 2011 20:54:28 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 31621-04 for ; Sun, 25 Sep 2011 23:54:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 1828CB5DBD1 for ; Sun, 25 Sep 2011 20:54:21 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p8PNsLJw010607; Sun, 25 Sep 2011 19:54:21 -0400 (EDT) To: "Burgholzer, Robert (DEQ)" cc: pgsql-admin@postgresql.org Subject: Re: diagnosing a db crash - server exit code 2 In-reply-to: References: Comments: In-reply-to "Burgholzer, Robert (DEQ)" message dated "Fri, 23 Sep 2011 15:02:49 -0400" Date: Sun, 25 Sep 2011 19:54:21 -0400 Message-ID: <10606.1316994861@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/182 X-Sequence-Number: 38419 "Burgholzer, Robert (DEQ)" writes: > I am trying to get my head around why I keep getting crashes to my PG > 8.3.7 database on CentOS - Linux version 2.6.18-164.el5. > LOG: server process (PID 5978) exited with exit code 2 Just like it says, this implies that a backend process exited with "exit(2)". A quick grep through the 8.3 sources says that the only such call in the backend code is in the SIGQUIT signal handler. Now it's possible that what you're seeing is an exit(2) somewhere in the R library rather than in Postgres code. But I think it's more likely that some external source is SIGQUIT'ing the backend. Joe suggested an OOM kill, but I've never heard of the OOM code using anything but SIGKILL (signal 9). Have you got any other software that runs as root and thinks it's licensed to kill processes in the name of something-or-other? Anyway, I concur with the plan of getting a stack trace to determine where the exit call is, so that we can positively eliminate (or not) the R library. regards, tom lane