Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDrLu-00027M-4L for pgsql-general@arkaria.postgresql.org; Sun, 12 Nov 2017 12:27:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1eDrLr-0008VK-V4 for pgsql-general@arkaria.postgresql.org; Sun, 12 Nov 2017 12:27:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eDrLr-0008VA-B6 for pgsql-general@postgresql.org; Sun, 12 Nov 2017 12:27:03 +0000 Received: from feynman.df7cb.de ([195.49.152.168]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eDrLn-00012G-RZ for pgsql-general@postgresql.org; Sun, 12 Nov 2017 12:27:02 +0000 Received: from msg.df7cb.de (unknown [IPv6:2a02:908:1474:d80:76e5:bff:fef3:7e00]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by feynman.df7cb.de (Postfix) with ESMTPSA id 3yZY1G4j8Pz3F22; Sun, 12 Nov 2017 13:26:58 +0100 (CET) Date: Sun, 12 Nov 2017 13:26:58 +0100 From: Christoph Berg To: Adam Brusselback , Tom Lane , "pgsql-general@postgresql.org" Subject: Re: Postgres 10.1 fails to start: server did not start in time Message-ID: <20171112122658.md7u7ahq5raqezft@msg.df7cb.de> Mail-Followup-To: Christoph Berg , Adam Brusselback , Tom Lane , "pgsql-general@postgresql.org" References: <8027.1510347112@sss.pgh.pa.us> <20171111132354.esi73rlpq3goyrqh@msg.df7cb.de> <20171111205316.u56lkmkakdmcx6zm@msg.df7cb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20171111205316.u56lkmkakdmcx6zm@msg.df7cb.de> User-Agent: NeoMutt/20170609 (1.8.3) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Re: To Adam Brusselback 2017-11-11 <20171111205316.u56lkmkakdmcx6zm@msg.df7cb.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@10-main.service - PostgreSQL Cluster 10-main Loaded: loaded (/lib/systemd/system/postgresql@.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@10-main.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@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@10-main[31922]: pg_ctl: server did not start in time Nov 12 13:24:21 lehmann systemd[1]: postgresql@10-main.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 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general