On an Ubuntu Server I have a Postgres database but its always shutting down after some time if it's not used.
My latest postgresql logs look like this:
Sep 17 12:38:01 localhost systemd[1]: postgresql.service: Succeeded.
Sep 17 12:38:01 localhost systemd[1]: Stopped PostgreSQL RDBMS.
Sep 17 12:38:01 localhost systemd[1]: Stopping PostgreSQL RDBMS...
Sep 17 12:38:04 localhost systemd[1]: Starting PostgreSQL RDBMS...
Sep 17 12:38:04 localhost systemd[1]: Finished PostgreSQL RDBMS.
Sep 18 12:07:50 localhost systemd[1]: postgresql.service: Succeeded.
Sep 18 12:07:50 localhost systemd[1]: Stopped PostgreSQL RDBMS.
Sep 18 12:07:50 localhost systemd[1]: Stopping PostgreSQL RDBMS...
Sep 18 12:07:53 localhost systemd[1]: Starting PostgreSQL RDBMS...
Sep 18 12:07:53 localhost systemd[1]: Finished PostgreSQL RDBMS.
Sep 21 16:24:55 localhost systemd[1]: postgresql.service: Succeeded.
Sep 21 16:24:55 localhost systemd[1]: Stopped PostgreSQL RDBMS.
Sep 21 16:24:55 localhost systemd[1]: Stopping PostgreSQL RDBMS...
Sep 21 16:24:55 localhost systemd[1]: Starting PostgreSQL RDBMS...
Sep 21 16:24:55 localhost systemd[1]: Finished PostgreSQL RDBMS.
Sep 21 16:33:18 localhost systemd[1]: postgresql.service: Succeeded.
Sep 21 16:33:18 localhost systemd[1]: Stopped PostgreSQL RDBMS.
Sep 21 16:33:18 localhost systemd[1]: Stopping PostgreSQL RDBMS...
Sep 21 16:33:19 localhost systemd[1]: Starting PostgreSQL RDBMS...
Sep 21 16:33:19 localhost systemd[1]: Finished PostgreSQL RDBMS.
Sep 21 16:34:05 localhost systemd[1]: postgresql.service: Succeeded.
Sep 21 16:34:05 localhost systemd[1]: Stopped PostgreSQL RDBMS.
Sep 21 16:34:05 localhost systemd[1]: Stopping PostgreSQL RDBMS...
Sep 21 16:34:05 localhost systemd[1]: Starting PostgreSQL RDBMS...
Sep 21 16:34:05 localhost systemd[1]: Finished PostgreSQL RDBMS.
If I call pg_lsclusters
after the DB is not available it says this:
Ver Cluster Port Status Owner Data directory Log file
12 main 5432 down postgres /var/lib/postgresql/12/main /var/log/postgresql/postgresql-12-main.log
Ubuntu version: Ubuntu 20.04.3 LTS
| PostgreSQL verstion: 12.8
0 Answers