pgbouncer logrotate configuration

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-pkg-yum(at)postgresql(dot)org
Subject: pgbouncer logrotate configuration
Date: 2015-05-12 14:44:49
Message-ID: 555211E1.3010805@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-pkg-yum

The pgbouncer logrotate configuration seems a bit contradictory:

/var/log/pgbouncer.log {
missingok
notifempty
sharedscripts
copytruncate
create 0640 pgbouncer pgbouncer
nodateext
postrotate
/bin/kill -HUP `cat /var/run/pgbouncer/pgbouncer.pid
2>/dev/null` 2> /dev/null || true
endscript
}

"create" is ignored if "copytruncate" is used. And having a postrotate
script to send a HUP signal is also pointless if copytruncate is used.
We need to decide on one way to do it: either copytruncate, or rename
and SIGHUP.

It also seems to me that this might be a bit simpler if we created a
subdirectory /var/log/pgbouncer/ for all the log files. Then we
wouldn't have the permissions issues that the "create" directory is
attempting to solve.

Comments?

Responses

Browse pgsql-pkg-yum by date

  From Date Subject
Next Message Martín Marqués 2015-05-12 19:32:08 New repmgr packages
Previous Message Peter Eisentraut 2015-05-07 14:09:09 pgbouncer wrong mode for logrotate file