Re: 8.4.12 log truncation not working?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 8.4.12 log truncation not working?
Дата
Msg-id 4450.1343676061@sss.pgh.pa.us
обсуждение исходный текст
Ответ на 8.4.12 log truncation not working?  (pg noob <pgnube@gmail.com>)
Список pgsql-novice
pg noob <pgnube@gmail.com> writes:
> Thank you Tom, that's basically the answer I was expecting (I had already
> found that thread you mentioned).
> But I had a slight hope for something better.

> If I understand this correctly then, if Postgres gets restarted and starts
> appending to the log that it would have truncated, then it has to wait a
> week before it rolls around to that day again before it will truncate the
> log?  Because that is what I am seeing, is some log files with multiple
> weeks worth of log messages appended to the same day file.

Yeah, that's how it would work.

It occurs to me that you could probably work around the issue if you
left log_filename set the way it is and reduced log_rotation_age to
something relatively small, like 10 minutes or so.  The server would
go through a rotation exercise every 10 minutes, but except at midnight,
it would decide to append because the computed filename hadn't changed.
So you'd only see the misbehavior if you restarted within 10 minutes
before midnight.  (At least I think it will work like that, haven't
tried it.)

            regards, tom lane

В списке pgsql-novice по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: very slow update query
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: very slow update query