We're using Red Hat Linux logrotate to do this
A file we called pgsql is put in the /etc/logrotate.d directory, it's
contents are as follows
This rotates the log files each morning when the daily cron jobs are
run. We found copytruncate to be the key, since without it the logs
Hope this helps
> -----Original Message-----
> From: nwalker [mailto:nwalker(at)eldocomp(dot)com]
> Sent: Thursday, 21 February 2002 05:47
> To: pgsql-admin
> Cc: nwalker
> Subject: FW: [ADMIN] Postgres Log Rolling
> This should be an easy one, but......
> We need to start rolling our postgres error logs. I wondered
> whether or
> not I could pull the rug out from under postgres by just renaming the
> pgsql.log to 'date'.log and then recreating (touch pgsql.log) the log.
> I then vacuum'd a database (so it would write stuff in the log), and
> noticed that the renamed log ('date'.log) was the one written
> to, not the
> new pgsql.log.
> Do I have to bounce the cluster to roll the log? How should I be
> performing this task?
> Naomi Walker
> Chief Information Officer
> Eldorado Computing, Inc.
> 602-604-3100 ext 242
> ---------------------------(end of
> TIP 6: Have you searched our list archives?
pgsql-admin by date
|Next:||From: Antony Stace||Date: 2002-02-21 08:50:34|
|Subject: Locks on Tables|
|Previous:||From: Stephan Szabo||Date: 2002-02-20 21:33:41|
|Subject: Re: pg_dump and pg_dumpall error|