BUG #14320: systemd terminates postgresql hot standby instance 90 seconds after start

From: andreas(dot)papst(at)univie(dot)ac(dot)at
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14320: systemd terminates postgresql hot standby instance 90 seconds after start
Date: 2016-09-09 10:50:14
Message-ID: 20160909105014.20024.66435@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 14320
Logged by: Andreas Papst
Email address: andreas(dot)papst(at)univie(dot)ac(dot)at
PostgreSQL version: 9.4.9
Operating system: Debian GNU/Linux 8.5 (jessie)
Description:

Hey,

when starting a hot standby database insstance with
`systemctl start postgresql',
anything works perfect: WAL files are beeing applied, r/o connections are
able to query the database, but after 90 seconds (systemd
DefaultTimeoutStartSec) postgresql is beeing shut down:
2016-09-01 10:30:15.235 CEST @ (/26671) LOG: received smart shutdown
request
2016-09-01 10:30:15.330 CEST @ (/26699) FATAL: terminating walreceiver
process
due to administrator command
2016-09-01 10:30:16.967 CEST @ (/26675) LOG: shutting down
2016-09-01 10:30:17.748 CEST @ (/26675) LOG: database system is shut down

and the systemctl start command returns too.

I guess this is due to a missing step in starting up postgresql in hot
standby configuration, where this process should be detached/daemonized
(calling setsid).

To proof it, I sent a signal with
`systemctl reload postgresql´ which caused the systemctl start command to
finish and kept postgresql running.

I've tried to find the respective lines in the code but I totally get lost.
So please if somebody can fix it.

Thank you

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2016-09-09 11:44:35 Re: Array dimension lost if dimension length is zero
Previous Message Shay Rojansky 2016-09-09 09:09:30 Re: Array dimension lost if dimension length is zero