[Pkg-postgresql-public] Bug#784878: postgresql-common: pg_ctlcluster isn't systemd aware

Christian Hofstaedtler zeha at debian.org
Sun May 10 01:39:28 UTC 2015


Package: postgresql-common
Version: 166
Severity: important

Dear Maintainer,

[Note: I'm filing this against v166, even though we're actually
using 166.pgdg80+1, but AFAICT there's no functional difference.]

When starting a database cluster using pg_ctlcluster x y start, the
postgres process ends up running inside the current user's slice and
logind session.

Example output from systemctl status:

 └─user.slice
   ├─user-2501.slice
   │ ├─session-7.scope
   │ │ ├─ 2911 postgres: sysusr applive 127.0.0.1(38276) idle                                                                                                                           
   │ │ ├─ 2913 postgres: sysusr applive 127.0.0.1(38278) idle                                                                                                                           
   │ │ ├─ 2914 postgres: sysusr applive 127.0.0.1(38279) idle                                                                                                                           
   │ │ ├─ 2915 postgres: sysusr applive 127.0.0.1(38280) SELECT                                                                                                                         
   │ │ ├─ 2920 postgres: sysusr applive 127.0.0.1(38285) idle                                                                                                                           
   │ │ ├─ 2922 postgres: sysusr applive 127.0.0.1(38286) idle                                                                                                                           
   │ │ ├─ 3094 /usr/lib/postgresql/9.4/bin/postgres -D /var/lib/postgresql/9.4/main -c unix_socket_directories=/var/run/postgresql -c config_file=/etc/postgresql/9.4/main/postgresql.conf


My colleague certainly expected pg_ctlcluster to do the right thing
(postgres process should have ended up in the system.slice), after
all it does manage all the other things (user switching,
oom_adjust, etc).

Maybe the best thing is, if systemd is running, to delegate starting
a cluster to systemd (using systemctl)?

Thank you,
  Christian



Cluster info:

$ pg_lsclusters 
Ver Cluster Port Status Owner    Data directory               Log file
9.4 main    5432 online postgres /var/lib/postgresql/9.4/main syslog

Additional package versions:

systemd 215-17
postgresql-9.4 9.4.1-1.pgdg80+1
postgresql-common 166.pgdg80+1


-- System Information:
Distributor ID:	Debian
Description:	Debian GNU/Linux 8.0 (jessie)
Release:	8.0
Codename:	jessie
Architecture: x86_64

Kernel: Linux 3.16.0-4-amd64 (SMP w/32 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages postgresql-common depends on:
ii  adduser                   3.113+nmu3
ii  debconf [debconf-2.0]     1.5.56
ii  init-system-helpers       1.22
ii  lsb-base                  4.1+Debian13+nmu1
ii  postgresql-client-common  166.pgdg80+1
ii  procps                    2:3.3.9-9
ii  ssl-cert                  1.0.35
ii  ucf                       3.0030

Versions of packages postgresql-common recommends:
ii  logrotate  3.8.7-1+b1

postgresql-common suggests no packages.

-- Configuration Files:
/etc/logrotate.d/postgresql-common 101326ef5d138998692ece35109ef1a2 [Errno 2] No such file or directory: u'/etc/logrotate.d/postgresql-common 101326ef5d138998692ece35109ef1a2'
/etc/postgresql-common/createcluster.conf 726b970f26919d3b2b0dcbeda2333910 [Errno 2] No such file or directory: u'/etc/postgresql-common/createcluster.conf 726b970f26919d3b2b0dcbeda2333910'

-- debconf information excluded

-- 
 ,''`.  Christian Hofstaedtler <zeha at debian.org>
: :' :  Debian Developer
`. `'   7D1A CFFA D9E0 806C 9C4C  D392 5C13 D6DB 9305 2E03
  `-



More information about the Pkg-postgresql-public mailing list