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?