"systemctl stop postgresql" fails to stop postgresql
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
postgresql-common (Debian) |
Confirmed
|
Unknown
|
|||
postgresql-common (Ubuntu) |
Triaged
|
Low
|
Unassigned |
Bug Description
Steps to reproduce (drop the "pgbouncer" for below commands if you only test barebones postgresql):
systemctl start postgresql pgbouncer && \
systemctl stop pgbouncer postgresql && \
ps auxw | grep ^postgre
No output is expected. However, in reality you get up to 6 running processes because /lib/systemd/
man -P cat systemctl | grep -A4 no-block
--no-block
Do not synchronously wait for the requested operation to finish. If
this is not specified, the job will be verified, enqueued and
passing this argument, it is only verified and enqueued.
As such, because --no-block was not used, the "systemctl stop" should wait until the operation
has finished.
The command "systemctl stop postgresql" should be running something along the lines
systemctl list-units 'postgresql*' | grep ^postgresql@ | awk '{print $1}' | xargs -r systemctl stop
before returning unless --no-block is given.
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: postgresql-common 173ubuntu0.2
ProcVersionSign
Uname: Linux 4.15.0-47-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.18
Architecture: amd64
Date: Wed Feb 5 16:46:04 2020
InstallationDate: Installed on 2017-04-25 (1016 days ago)
InstallationMedia: Ubuntu-Server 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215.8)
PackageArchitec
SourcePackage: postgresql-common
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in postgresql-common (Debian): | |
status: | Unknown → Confirmed |
maybe somewhat related to bug 870379 ?