Question

Postgresql is stopping after restart

2022-09-08 08:39:02.127 IST [959] LOG: terminating TimescaleDB background worker launcher due to administrator command 2022-09-08 08:39:02.127 IST [963] LOG: terminating TimescaleDB job scheduler due to administrator command 2022-09-08 08:39:02.127 IST [945] LOG: received smart shutdown request 2022-09-08 08:39:02.127 IST [959] FATAL: terminating connection due to administrator command 2022-09-08 08:39:02.129 IST [963] FATAL: terminating connection due to administrator command 2022-09-08 08:39:02.131 IST [945] LOG: background worker “TimescaleDB Background Worker Launcher” (PID 959) exited with exit code 1 2022-09-08 08:39:02.131 IST [945] LOG: background worker “logical replication launcher” (PID 960) exited with exit code 1 2022-09-08 08:39:02.131 IST [945] LOG: background worker “TimescaleDB Background Worker Scheduler” (PID 963) exited with exit code 1 2022-09-08 08:39:02.131 IST [954] LOG: shutting down 2022-09-08 08:39:02.159 IST [945] LOG: database system is shut down


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello @ee4a56606d9d-4339-8f2c-487a86

You can create a simple script to check if Posgresql is running and if not to start the service.

  1. #!/bin/bash
  2. # Check if MySQL is running
  3. sudo systemctl status postgresql.service > /dev/null 2>&1
  4. # Restart the MySQL service if it's not running.
  5. if [ $? != 0 ]; then
  6. sudo systemctl start postgresql.service
  7. fi

Regards

Hi there,

It sounds like you might have to enable the Postgres service:

sudo systemctl enable postgresql.service

That way after you restart your server, the Postgres service will automatically start on boot.

Hope that this helps.

Best,

Bobby