Re: postgresql systemd service fails to start only on boot but notmanually - Mailing list pgsql-general

From Adrian Klaver
Subject Re: postgresql systemd service fails to start only on boot but notmanually
Date
Msg-id 46968a21-c937-232c-009c-fb65af1005af@aklaver.com
Whole thread Raw
In response to postgresql systemd service fails to start only on boot but notmanually  (Doron Behar <doron.behar@gmail.com>)
Responses Re: postgresql systemd service fails to start only on boot but notmanually  (Doron Behar <doron.behar@gmail.com>)
List pgsql-general
On 9/22/18 3:44 AM, Doron Behar wrote:
> Hello everyone,
> 
> I'm having trouble with my PostgreSQL Systemd service and I wonder
> whether this is a problem with the software or some problem with the
> packaging or build.
> 
> My server fails to start PostgreSQL only on boot, if I restart it
> manually afterwards it doesn't have any problem starting. Here is the
> log extracted from the journal:
> 
> ```
> 2018-09-21 20:46:40.028 CEST [306] LOG:  listening on IPv4 address "127.0.0.1", port 5432
> 2018-09-21 20:46:40.036 CEST [306] LOG:  listening on Unix socket "/run/postgresql/.s.PGSQL.5432"
> 2018-09-21 20:46:40.233 CEST [337] LOG:  database system was shut down at 2018-09-21 20:46:21 CEST
> 2018-09-21 20:48:10.441 CEST [352] WARNING:  worker took too long to start; canceled
> 2018-09-21 20:49:10.469 CEST [352] WARNING:  worker took too long to start; canceled
> 2018-09-21 20:49:10.478 CEST [306] LOG:  database system is ready to accept connection > 2018-09-21 20:49:10.486 CEST
[306]LOG:  received fast shutdown request
 
> 2018-09-21 20:49:10.497 CEST [306] LOG:  aborting any active transactions
> 2018-09-21 20:49:10.498 CEST [637] FATAL:  terminating autovacuum process due to administrator command
> 2018-09-21 20:49:10.500 CEST [306] LOG:  worker process: logical replication launcher (PID 636) exited with code 1
> 2018-09-21 20:49:10.501 CEST [349] LOG:  shutting down
> 2018-09-21 20:49:10.518 CEST [306] LOG:  database system is shut down
> ```
> 
> Any Ideas? I'd really like to fix this since now after every reboot I have to
> remember to manually restart it.

Linux distro and version?

Assuming Postgres version 10+ given logical replication warning. Still 
actual version would be nice.

How did you install Postgres?

Where did systemd script come from?

What is in the systemd script?

What does the log show when you do a successful manual start?

What does the system log show when the Postgres reboot startup fails?




> 
> Thanks.
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: "Daniel Verite"
Date:
Subject: Re: PostgreSQl, PHP and IIS
Next
From: Christoph Moench-Tegeder
Date:
Subject: Re: postgresql systemd service fails to start only on boot but notmanually