From: | Luca Ferrari <fluca1978(at)infinito(dot)it> |
---|---|
To: | Theodotos Andreou <theo(at)theo-andreou(dot)org> |
Cc: | pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Error: pid file is invalid, please manually kill the stale server process. |
Date: | 2014-02-13 08:39:00 |
Message-ID: | CAKoxK+70j1N4Mt7BeivpuNNSWrXDKjmeeCQ4NB0WaHQeUwcRPA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Wed, Feb 12, 2014 at 6:59 AM, Theodotos Andreou
<theo(at)theo-andreou(dot)org> wrote:
> 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:
>
It is not clear what the real problem is. After a machine reboot it is
normal that there is no pid file, meaning a clean shutdown happened
(from the PostgreSQL perspective). After a full start, if the
PostgreSQL process is configured for automatic start, a pid file
should exist. I suspect the problem is related to some ubuntu booting
script that will place the pid file somewhere else from where the
pg_ctl expects to find it.
> An even scarier side-effect of this is that the data, when this happens, are
> older than the most recent data in the database.
>
This does not make sense at all. How do you know that data is older?
And most notably: is data stable? I mean, could it be some kind of
snapshotting of the database filesystem (as other suggested) or sounds
like a data corruption?
> 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?
PostgreSQL is reliable, but even a reliable system can crash when
running on a totally unreliable piece of hardware. I suggest investing
in some good platform to avoid stressing the database with resumes.
However, in such scenario, I will choose a sync of all commits and
short checkpoints, but this will lead to bad performances.
Luca
From | Date | Subject | |
---|---|---|---|
Next Message | Dubravko Sever | 2014-02-13 09:07:27 | Re: Backup of shut down standby does not work? |
Previous Message | Jürgen Fuchsberger | 2014-02-13 08:37:38 | Backup of shut down standby does not work? |