0

Postgres 9.6.1 does not start automatically after an "abrupt" reboot (Ubuntu 18.04).

Postgres service is configured to start on reboot, but the server does not come up at all!

The only way to start it is logging into Ubuntu as root and manually typing:

 /etc/init.d/postgresql-96 start

... and it shows that server was "already running" (but surely wasn't!):

Starting PostgreSQL 9.6:
pg_ctl: another server might be running; trying to start server anyway

Does anybody know what can cause this? (If this is a Postgres 9.6.1 bug, is there any solution beside upgrading?)

2
  • Check the log file. Did it try to start but fail, or never try?
    – jjanes
    Jul 1, 2023 at 12:06
  • There are lots of bugs in 9.6.1, though probably not relevant to this.
    – jjanes
    Jul 1, 2023 at 12:08

1 Answer 1

0

If your autostart procedure is failing, make sure that it is configured correctly:

chkconfig --add postgresql-96
chkconfig --level 2345 postgresql-96 on

These commands have to be run by the root user.

4
  • It never starts! Ever!! No matter how long I wait! But when I start it manually, it comes up and starts crash recovery.
    – Christian
    Jul 4, 2023 at 22:01
  • Then I misunderstood your question. If it is only the autostart functionality that is failing, that is not a PostgreSQL problem. Jul 5, 2023 at 3:25
  • The problem is postgres is leaving "something" that indicates to itself that it has it is already running and the service does not come up!
    – Christian
    Jul 5, 2023 at 14:53
  • That depends on the undisclosed script. But if that cannot deal with a crashed PostgreSQL cluster, it is broken. Jul 5, 2023 at 14:59

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.