I am using PostgreSQL 9.2 on RedHat 6

I'm a little confused as to why the following is happening:

  1. When postgres is running, performing "service postgresql92-postgresql status" as root results in "postmaster (pid 1379) is running..." (as expected)

  2. As postgres run "pg_ctl stop -D $PGDATA -m s" to stop postgres

  3. As postgres run "pg_ctl -D $PGDATA start" to start postgres (postgres is now running correctly)

  4. Now as root run "service postgresql92-postgresql status", output is now "postmaster dead but pid file exists"

My confusion is why am I getting the message in step 4 when postgres is running correctly? Am I stopping/starting postgres incorrectly?

  • If you don't do the step 3 (ie. start postgres), what does your step 4 outputs ?
    – Eric Ly
    Apr 17, 2015 at 7:56
  • the same "postmaster dead..." message, this message starts as soon as i use the "pg_ctl stop" command Apr 17, 2015 at 8:04
  • Can you check the rights of your pid file ?
    – Eric Ly
    Apr 17, 2015 at 8:13
  • the postmaster.pid is 600 owned by postgres, there is also a postmaster.5432.pid which has 644 permissions and owned by root! Apr 17, 2015 at 8:16
  • Can you cat the two pid files and check which one is used by service postgresql92-postgresql status ?
    – Eric Ly
    Apr 17, 2015 at 8:19

1 Answer 1


service postgresql92-postgresql status checks if the file postmaster.5432.pid instead of postmaster.pid.

I'd recommend to use only pg_ctl as postgres and check with ps aux as root. Or use only service postgresql92-postgresql start/stop/status as root. Mixing the two methods would turn into conflicts.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.