Re: Postgres/Postmaster logging and log rotation

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: William L James <BJames(at)inetmi(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Postgres/Postmaster logging and log rotation
Date: 2001-03-07 16:44:34
Message-ID: Pine.LNX.4.30.0103071741560.986-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net http://yi.org/peter-e/

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Lamar Owen 2001-03-07 17:13:40 Re: Postgres/Postmaster logging and log rotation
Previous Message root 2001-03-07 15:37:30 Re: Postgres/Postmaster logging and log rotation