Re: Postgres/Postmaster logging and log rotation - Mailing list pgsql-admin

From Peter Eisentraut
Subject Re: Postgres/Postmaster logging and log rotation
Date
Msg-id Pine.LNX.4.30.0103071741560.986-100000@peter.localdomain
Whole thread Raw
In response to Postgres/Postmaster logging and log rotation  (William L James <BJames@inetmi.com>)
List 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 by date:

Previous
From: William L James
Date:
Subject: Postgres/Postmaster logging and log rotation
Next
From: Lamar Owen
Date:
Subject: Re: Postgres/Postmaster logging and log rotation