Re: Built-in log rotation

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Built-in log rotation
Дата
Msg-id 20070219155308.GN28395@alvh.no-ip.org
обсуждение исходный текст
Ответ на Built-in log rotation  (Kris Kiger <kris@musicrebellion.com>)
Список pgsql-admin
Kris Kiger wrote:
> Greetings!  I've been doing some research into log rotation software and
> ran into this, while looking through the postgres site:
>
> "There is a built-in log rotation program, which you can use by setting
> the configuration parameter redirect_stderr to true in postgresql.conf."
> http://www.postgresql.org/docs/8.1/interactive/logfile-maintenance.html
>
> My question is, how does it rotate logs?

It closes the old file and opens a new one -- new name, new file
descriptor, so the problem you mention below doesn't exist anymore.

> Does it perform a
> copy/truncate of the logfile?  I know in older versions of postgres, if
> you tried to move the log file, and create one with the same name, the
> server wouldn't actually write to it without a restart...at least in
> linux it wouldn't.

This code is "new" (only two years old).

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

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

Предыдущее
От: Kris Kiger
Дата:
Сообщение: Built-in log rotation
Следующее
От: Ray Stell
Дата:
Сообщение: log_duration?