[Pkg-postgresql-public] Bug#876669: postgresql: cannot make standard postgresql clusters log to stderr or syslog

Daniel Kahn Gillmor dkg at fifthhorseman.net
Sun Sep 24 02:15:43 UTC 2017


Package: postgresql
Version: 9.6+184
Severity: normal

I'm running postgresql 9.6 in a minimal virtual machine (with systemd
as pid 1), where nothing else is writing to /var/log (with the
exception of systemd-journald, when configured for non-ephemeral
logging).

however, the postgresql 9.6-main cluster is logging to
/var/log/postgresql/postgresql-9.6-main.log -- i'd rather keep the
logging centralized on this host, rather than having individual
daemons write their own logfiles.

So I'd like the cluster to log to stderr (or syslog), to have it not
have to contemplate log rotation at all.  I've uncommented the
following in /etc/postgresql/9.6/main/postgresql.conf:

    log_destination = 'stderr'
    logging_collector = off

but this doesn't prevent the postgres process from re-opeing
/var/log/postgresql/postgresql-9.6-main.log.  I've traced the startup
code as far as pg_ctlcluster to where it looks like it's enforcing the
logging to /var/log, but i can't figure out how to get it to stop.
And pg_ctlcluster seems to define the active logging to the filesystem
as part of the "start" subcommand :/

How can i get it to not write to these logs?

    --dkg

-- System Information:
Debian Release: buster/sid
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing'), (500, 'oldstable'), (200, 'unstable-debug'), (200, 'unstable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

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

Versions of packages postgresql depends on:
ii  postgresql-9.6  9.6.5-1

postgresql recommends no packages.

Versions of packages postgresql suggests:
ii  postgresql-doc  9.6+184

-- no debconf information



More information about the Pkg-postgresql-public mailing list