Re: Postgres 10.1 fails to start: server did not start in time

From: Christoph Berg <myon(at)debian(dot)org>
To: Adam Brusselback <adambrusselback(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgres 10.1 fails to start: server did not start in time
Date: 2017-11-12 12:26:58
Message-ID: 20171112122658.md7u7ahq5raqezft@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Re: To Adam Brusselback 2017-11-11 <20171111205316(dot)u56lkmkakdmcx6zm(at)msg(dot)df7cb(dot)de>
> I'm investigating if it's a good idea to tell systemd to ignore the
> exit code of pg_ctl(cluster).

Telling systemd to ignore ExecStart errors seems to be the correct
solution. The service will still be active, with the startup error
being shown:

● postgresql(at)10-main(dot)service - PostgreSQL Cluster 10-main
Loaded: loaded (/lib/systemd/system/postgresql(at)(dot)service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2017-11-12 13:24:21 CET; 210ms ago
Process: 31892 ExecStop=/usr/bin/pg_ctlcluster --skip-systemctl-redirect -m fast 10-main stop (code=exited, status=0/SUCCESS)
Process: 31922 ExecStart=/usr/bin/pg_ctlcluster --skip-systemctl-redirect 10-main start (code=exited, status=1/FAILURE)
Main PID: 31928 (postgres)
Tasks: 8 (limit: 4915)
CGroup: /system.slice/system-postgresql.slice/postgresql(at)10-main(dot)service
├─31928 /usr/lib/postgresql/10/bin/postgres -D /var/lib/postgresql/10/main -c config_file=/etc/postgresql/10/main/postgresql.conf
├─31931 postgres: 10/main: checkpointer process
├─31932 postgres: 10/main: writer process
├─31933 postgres: 10/main: wal writer process
├─31934 postgres: 10/main: autovacuum launcher process
├─31935 postgres: 10/main: archiver process
├─31936 postgres: 10/main: stats collector process
└─31937 postgres: 10/main: bgworker: logical replication launcher

Nov 12 13:24:20 lehmann systemd[1]: Starting PostgreSQL Cluster 10-main...
Nov 12 13:24:21 lehmann postgresql(at)10-main[31922]: Error: /usr/lib/postgresql/10/bin/pg_ctl /usr/lib/postgresql/10/bin/pg_ctl start -D /var/lib/postgresql/10/main -l /var/log/postgresql/postgresql-10-main.log -t 0 -s -o -c config_file="/etc/postgresql/10/main/postgresql.conf" exited with status 1:
Nov 12 13:24:21 lehmann postgresql(at)10-main[31922]: pg_ctl: server did not start in time
Nov 12 13:24:21 lehmann systemd[1]: postgresql(at)10-main(dot)service: PID file /var/run/postgresql/10-main.pid not readable (yet?) after start: No such file or directory
Nov 12 13:24:21 lehmann systemd[1]: Started PostgreSQL Cluster 10-main.

Fixed in https://anonscm.debian.org/cgit/pkg-postgresql/postgresql-common.git/commit/?id=fc57e655c71e8f6bcb3010b054f5adbf32a224d7 , thanks for the report!

Christoph

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter J. Holzer 2017-11-12 17:35:59 Re: Postgres 10.1 fails to start: server did not start in time
Previous Message Lele Gaifax 2017-11-12 07:52:32 Re: Difference between CAST(v AS t) and v::t