From: andreas.papst@univie.ac.at
To: pgsql-bugs@postgresql.org
Subject: BUG #14320: systemd terminates postgresql hot standby instance 90 seconds after start
Date: Fri, 09 Sep 2016 10:50:14 +0000
Message-ID: <20160909105014.20024.66435@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 14320
Logged by: Andreas Papst
Email address: andreas.papst@univie.ac.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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: andreas.papst@univie.ac.at
Subject: Re: BUG #14320: systemd terminates postgresql hot standby instance 90 seconds after start
In-Reply-To: <20160909105014.20024.66435@wrigleys.postgresql.org>
References: <20160909105014.20024.66435@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox