pgbouncer logrotate configuration - Mailing list pgsql-pkg-yum

From Peter Eisentraut
Subject pgbouncer logrotate configuration
Date
Msg-id 555211E1.3010805@gmx.net
Whole thread Raw
Responses Re: pgbouncer logrotate configuration
List 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?


pgsql-pkg-yum by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgbouncer wrong mode for logrotate file
Next
From: Martín Marqués
Date:
Subject: New repmgr packages