Re: BUG #7890: wrong behaviour using pg_rotate_logfile() with parameter log_truncate_on_rotation = on

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rafael Martinez <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no>
Cc: sari(dot)thiele(at)usit(dot)uio(dot)no, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #7890: wrong behaviour using pg_rotate_logfile() with parameter log_truncate_on_rotation = on
Date: 2013-02-19 10:21:18
Message-ID: 23409.1361269278@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Rafael Martinez <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no> writes:
> If the behavior we are talking about is intentional, why do be have
> pg_rotate_logfile() if we can not manually override with this function
> log_rotation_age and log_rotation_size?

It works fine as long as the filename pattern is such that a new file
would be selected.

If we didn't have this filter, then a rotation operation would wipe out
*current* log entries, even those that were made a millisecond ago.
That can't possibly be a good idea. Any rotation scheme ought to
provide for recent entries to survive at least until you've rotated
through whichever other log files you have.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Rafael Martinez 2013-02-19 10:58:39 Re: BUG #7890: wrong behaviour using pg_rotate_logfile() with parameter log_truncate_on_rotation = on
Previous Message Rafael Martinez 2013-02-19 10:15:53 Re: BUG #7890: wrong behaviour using pg_rotate_logfile() with parameter log_truncate_on_rotation = on