[pgpool-general: 3841] Re: log rotation

Pablo Sanchez pablo at blueoakdb.com
Wed Jul 1 06:15:05 JST 2015


[ Comments below, in-line ]

On 06/30/2015 05:11 PM, Wes Mitchell wrote:
> Hi,
>
> How does one do log rotation for pgpool? I played around with
> logrotate.d a bit (RHEL), but don't know if it really works; how do I
> get pgpool to switch log files (it doesn't like HUP too much)? Does
> /etc/init.d/pgpool-II-94 reload do the trick?

Hi Wes,

I google'd around and found people using "rotatelogs"  That's what I 
implemented.

Here's a snippet .. it's all one line but below, I'm using two lines to 
try and improve readability:

   $SU -l $PGPOOLUSER -c "$PGPOOLDAEMON -f $PGPOOLCONF -m fast stop 2>&1 |
     /usr/sbin/rotatelogs -l -f ${PGPOOLLOG}.%a"

Cheers,

--
Pablo Sanchez - Blueoak Database Engineering, Inc
Ph:    819.459.1926         Blog:  http://pablo-blog.blueoakdb.com
iNum:  883.5100.0990.1054



More information about the pgpool-general mailing list