1
votes

I tried to restart Postgres(Version 9.6) after editing the postgresql.conf file . But its not working

    pg_ctl stop 

waiting for server to shut down............................................................... failed pg_ctl: server does not shut down

when I try to connect to Postgres , it says "Server is shutting down" and I am not able to connect .Below is what I am getting for pg_ctl start

    pg_ctl start

2018-02-24 21:11:12 CET FATAL: lock file "postmaster.pid" already exists 2018-02-24 21:11:12 CET HINT: Is another postmaster (PID 42946) running in data directory "/pgDATA/data"?

I tried to kill 42946. But still I am getting the same error .

  pg_ctl status 

This shows that the sever is running . But not able to connect .

1

1 Answers

3
votes

First you should look into the log file; maybe you get a clue from it.

If nothing else works, try pg_ctl stop -m i to force PostgreSQL to stop.

If that doesn't work either, check if a process is in uninterruptible sleep. That would necessitate a reboot of the machine.