Re: Postgres/Postmaster logging and log rotation

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Postgres/Postmaster logging and log rotation
Дата
Msg-id Pine.LNX.4.30.0103071741560.986-100000@peter.localdomain
обсуждение исходный текст
Ответ на Postgres/Postmaster logging and log rotation  (William L James <BJames@inetmi.com>)
Список pgsql-admin
William L James writes:

> script - su -l postgresql -c "/usr/bin/pg_ctl -D $PGDATA -p
> /usr/bin/postmaster start >>/var/log/postgresql 2>&1"), but
> when the weekly logrotate.d function kicks in, Postgres logging
> stops.

The logging probably continues to go to the rotated-away file.  The
typical log rotation cron job presumes that the daemons close the log
files periodically.  This is not the case with PostgreSQL.  A good
solution is to pipe your log output to a small program that does the log
rotating (or simply closes the log file once in a while), like rotatelogs
from Apache.

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


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

Предыдущее
От: William L James
Дата:
Сообщение: Postgres/Postmaster logging and log rotation
Следующее
От: Lamar Owen
Дата:
Сообщение: Re: Postgres/Postmaster logging and log rotation