Re: postmaster and logrotate

From: Claudio Succa <claudio(dot)succa(dot)ml(at)pertel(dot)it>
To: Dima Tkach <dmitry(at)openratings(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: postmaster and logrotate
Date: 2003-12-22 18:54:05
Message-ID: 1072119245.722.6.camel@master.to1.pertel.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Il lun, 2003-12-22 alle 19:40, Dima Tkach ha scritto:
> Hi, everybody!
>
> I was wonderring if there is a way to make logrotate work with postgres
> logs?
> More precisely, the question is - is there any way to tell a running
> postmaster process to reopen its log file?
> I tried kill -HUP ... but that doesn't seem to do anything...
>
> Is there just no way to do what I want?
>
> Thanks!
>
> Dima

In /etc/logrotate.d create a file named i.e. postgres with more or less
the following contents:

/var/log/postgres.log {
weekly
missingok
rotate 4
copytruncate
compress
delaycompress
notifempty
}

Pls notate the 'copytruncate' option which enables the routing of the
output of syslogd to a new file.

Claudio

--
Claudio Succa
PERTEL - Torino - Italy
+39-011-437.4141
http://www.pertel.it
http://www.uniassist.it

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Robert Treat 2003-12-22 19:38:48 Re: Groff and Weinberg SQL Complete Reference - Sample
Previous Message Dima Tkach 2003-12-22 18:40:32 postmaster and logrotate