Re: BUG #7890: wrong behaviour using pg_rotate_logfile() with parameter log_truncate_on_rotation = on - Mailing list pgsql-bugs

From Heikki Linnakangas
Subject Re: BUG #7890: wrong behaviour using pg_rotate_logfile() with parameter log_truncate_on_rotation = on
Date
Msg-id 5123733A.1090904@vmware.com
Whole thread Raw
In response to Re: BUG #7890: wrong behaviour using pg_rotate_logfile() with parameter log_truncate_on_rotation = on  (Rafael Martinez <r.m.guerrero@usit.uio.no>)
List pgsql-bugs
On 19.02.2013 14:31, Rafael Martinez wrote:
> In the way pg_rotate_logfile() and log_truncate_on_rotation = on work
> today, we have to stop postgres to truncate the log file if an
> unexpected situation happens and this is not always possible in a
> production system.
>
> If we need to run pg_rotate_logfile() manually in the middle of the
> month and we don't want to lose the data in the file that is going to
> be truncated, we will have to take a manual copy of it before running
> pg_rotate_logfile().

You can rm the log file, then do pg_rotate_logfile(). No need to stop
the system.

- Heikki

pgsql-bugs by date:

Previous
From: Rafael Martinez
Date:
Subject: Re: BUG #7890: wrong behaviour using pg_rotate_logfile() with parameter log_truncate_on_rotation = on
Next
From: Peter Kroon
Date:
Subject: Re: Nested xmlagg doesn't give a result 9.2.3