Missing PostgreSQL postmaster.pid

11,893

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
Share:
11,893

Related videos on Youtube

Dika
Author by

Dika

Updated on September 18, 2022

Comments

  • Dika
    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
    Dika almost 10 years
    Thanks 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.