Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WDo3L-0003Hj-Un for pgsql-admin@arkaria.postgresql.org; Thu, 13 Feb 2014 04:37:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WDo3L-00044g-EG for pgsql-admin@arkaria.postgresql.org; Thu, 13 Feb 2014 04:37:35 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WDo3J-00041r-G6 for pgsql-admin@postgresql.org; Thu, 13 Feb 2014 04:37:33 +0000 Received: from qmta05.westchester.pa.mail.comcast.net ([2001:558:fe14:43:76:96:62:48]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WDo3G-0004WW-CD for pgsql-admin@postgresql.org; Thu, 13 Feb 2014 04:37:32 +0000 Received: from omta04.westchester.pa.mail.comcast.net ([76.96.62.35]) by qmta05.westchester.pa.mail.comcast.net with comcast id RgbU1n0010ldTLk55gdU2G; Thu, 13 Feb 2014 04:37:28 +0000 Received: from sz0093.wc.mail.comcast.net ([68.87.26.137]) by omta04.westchester.pa.mail.comcast.net with comcast id RgdU1n00T2xV5no01gdUVN; Thu, 13 Feb 2014 04:37:28 +0000 Date: Thu, 13 Feb 2014 04:37:28 +0000 (UTC) From: Lou Picciano To: pgsql-admin@postgresql.org Cc: Theodotos Andreou Message-ID: <279304661.90971.1392266248752.JavaMail.root@sz0093a.westchester.pa.mail.comcast.net> In-Reply-To: <52FB0DBA.2010907@theo-andreou.org> Subject: Re: Error: pid file is invalid, please manually kill the stale server process. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [::ffff:76.117.177.86] X-Mailer: Zimbra 6.0.13_GA_2944 (ZimbraWebClient - SAF3 (Mac)/6.0.13_GA_2944) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1392266248; bh=/Fawbv23qQcE+7xlcE9r6Kof2s851KYwsYimJVXtGYo=; h=Received:Received:Date:From:To:Message-ID:Subject:MIME-Version: Content-Type; b=mntDA4qBLGO1mZh9MTvjs7stWRppMzfVv/UbrlQWa/XotP6hkm74yuogZaVq0v4bh vv4f6fHsdm/qGTAmRmOBH5RyfSZrtwKGPf6nB3CBHxl2hdLTyQuIFwzXLL0cJ7kVzl Vs47DUG8ItAuJ9wUGZyyhPu6NXqeQ0hQ46N4t6tic6NHzc3nWa6voZW7J+cbIYh+Vy r+eSOAVvWF2dAYjemwfDRkS/NDbEt3Xn/MPLyBuOuo5WIfZTy6w3sSvfTOp9ZkjudS p/jVPP2F327pnFy39b3xe/PNqjWNWQIkbXpQQAuZlKiWHgplUuzvsD6kRc5vygRYZa Z/pHkJsdSj3Fg== X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Theo, Don't know much about the tools you may have installed on Ubuntu (don't use Ubuntu), but sounds like you have something 'snapshot-ing' your dataset... And that, on restart-after-inelegant-shutdown, the PostgreSQL service is trying to attach to the 'wrong' data. Generally, yes; PostgreSQL is extremely reliable. We've found it to recover quite nicely, even from bad (human, sometimes testing-intentional!) behavior. Also doesn't sound like a version-specific problem. Lou Picciano ----- Original Message ----- From: "Theodotos Andreou" To: pgsql-admin@postgresql.org Sent: Wednesday, February 12, 2014 12:59:22 AM Subject: [ADMIN] Error: pid file is invalid, please manually kill the stale server process. Hi all, I am using postgres on Ubuntu 12.04 64 bit server. The version is 9.1.10 and I used the stock postgres from Ubuntu repos. I have a weird problem. Sometimes when the machine is restarted, there is no $PGDATA/postmaster.pid file. So when I try to restart postgres (service postgresql restart) I get the following error: Error: pid file is invalid, please manually kill the stale server process. An even scarier side-effect of this is that the data, when this happens, are older than the most recent data in the database. It may be important to know that postgres runs under monit non sysv init or upstart. Also postgres is installed on a customer appliance that may experience frequent reboots and even abrupt poweroffs! Is postgres in general ideal for this situation? Is there an optimal configuration for this scenario? Regards theo -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin