Re: Error: pid file is invalid, please manually kill the stale server process.

From: Lou Picciano <loupicciano(at)comcast(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Cc: Theodotos Andreou <theo(at)theo-andreou(dot)org>
Subject: Re: Error: pid file is invalid, please manually kill the stale server process.
Date: 2014-02-13 04:37:28
Message-ID: 279304661.90971.1392266248752.JavaMail.root@sz0093a.westchester.pa.mail.comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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" <theo(at)theo-andreou(dot)org>
To: pgsql-admin(at)postgresql(dot)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(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jürgen Fuchsberger 2014-02-13 08:37:38 Backup of shut down standby does not work?
Previous Message Tom Lane 2014-02-12 15:15:25 Re: [GENERAL]