| From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
|---|---|
| To: | KK <knickknack(at)moppix(dot)de>, "pgsql-novice(at)lists(dot)postgresql(dot)org" <pgsql-novice(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Service cannot start after restart |
| Date: | 2026-09-14 16:55:26 |
| Message-ID: | bf02382727ec54aad018ed57c582070ae3a2b81a.camel@cybertec.at |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
On Mon, 2026-09-14 at 15:18 +0200, KK wrote:
> I have a Debian 13.3 system with the following packages installed.
>
> ii postgresql 18+287.pgdg13+1 all
> ii postgresql-15 15.15-1.pgdg13+1 amd64
> rc postgresql-17 17.7-3.pgdg13+1 amd64
> ii postgresql-18 18.1-1.pgdg13+2 amd64
> ii postgresql-18-jit 18.1-1.pgdg13+2 amd64
> ii postgresql-client-15 15.15-1.pgdg13+1 amd64
> ii postgresql-client-18 18.1-1.pgdg13+2 amd64
> ii postgresql-client-common 287.pgdg13+1 all
> ii postgresql-common 287.pgdg13+1 all
>
> I obtain the packages from the PGDG.
>
> Two clusters are active: v18 on port 5432 and v15 on port 5433. Both are enabled for autostart.
> Now for the problem:
>
> When I start the systemd service `postgresql(at)18-main` using `systemctl`, I get an error message
> stating that start/stop/restart operations are not possible via the unit.
>
> Checking the service status reveals the error message.
>
> postgresql(at)18-main[3055270]: Cluster is already running.
> systemd[1]: postgresql(at)18-main(dot)service: Can't open PID file '/run/postgresql/18-main.pid' (yet?) after start: No such file or directory
> systemd[1]: postgresql(at)18-main(dot)service: Failed with result 'protocol'.
> systemd[1]: Failed to start postgresql(at)18-main(dot)service - PostgreSQL Cluster 18-main.
>
> The twist, however, is that the service *is* actually active and was started using `pg_ctlcluster` (which works fine).
>
> Even though the service is active and reachable, `pg_lscluster` displays the following:
>
> 18 main 5432 down postgres /var/lib/postgresql/18/main /var/log/postgresql//postgresql-%d.log
>
> Access via `psql` is possible.
>
> In any case, the v18 service fails to start via the systemd unit upon a restart.
>
> Do you have any suggestions for me?
Try to stop the cluster using "pg_ctlcluster", then start it with "systemctl".
Yours,
Laurenz Albe
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Subramanian,Ramachandran | 2026-09-21 11:03:30 | V16 to V18 Upgrade with pg_dumpall -- Question |
| Previous Message | only-pacify-defile | 2026-09-14 14:28:55 | Re: Service cannot start after restart |