Missing PostgreSQL postmaster.pid
postmaster.pid
should be absent if the server isn't running. That's correct. It's the process ID of the running PostgreSQL server, and if there isn't one, there's not going to be a postmaster.pid
unless the server stopped abruptly, in which case it'll contain the pid of the old postmaster from before the crash until PostgreSQL is restarted, at which point PostgreSQL will replace it with the pid of the new postmaster.
You never need to mess with postmaster.pid
. Above all else, never delete it.
Whatever the cause for the service not starting is, a missing postmaster.pid
is not it.
You haven't shown what command you used to start PostgreSQL, what the error was, or anything else, so it's hard to help you beyond that. General tips:
- you must start and stop services with
sudo
; - Check
/var/log/syslog
and the PostgreSQL logs for details on startup problems
Related videos on Youtube
Dika
Updated on September 18, 2022Comments
-
Dika almost 2 years
I have PostgreSQL 8.4 installed on ubuntu 12.04. When i start postgresql service through terminal, it doesn't start. Then i check and found that postmaster.pid is missing. My question is how can i recover that postmaster.pid and what could possibly caused that missing postmaster.pid ?
Thanks. Sorry for my bad english since i'm not native.
-
Dika almost 10 yearsThanks for your reply. I was attempted checking postgresql using "/etc/init.d/postgresql status" command. But now i managed solving that problem by reinstalling PostgreSQL. Before my postmaster.pid missing, i was doing fine with that. And then i shutdown my pc and start it as usual. When i checked postgresql service using that command it showed error. Since my problem is solved i forgot what error was showed. I'm currently posting this comment using windows since i got dual-booting.