| From: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk> |
|---|---|
| To: | Renê Salomão <rene(at)ibiz(dot)com(dot)br> |
| Cc: | pgsql-novice(at)postgresql(dot)org |
| Subject: | Re: Postgres logs w/ Logrotate |
| Date: | 2003-03-31 21:24:48 |
| Message-ID: | 1049145888.4073.91.camel@linda.lfix.co.uk |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
On Fri, 2003-03-28 at 14:35, Renê Salomão wrote:
> Hi list,
>
> Is there any extra configuration to run postgresql 7.3.2 logs
> with logrotate?
> I tried the following script at /etc/logrotate.d:
>
> /var/log/postgresql/postgresql.log {
> daily
> rotate 5
> compress
> create
> }
>
> the problem is that after it does its first rotation (create a
> compressed copy of the log) and the new log file created, any new
> message originated from postgresql is not saved in log file...
>
> I do start postgres with:
>
> pg_ctl start -o -i -l /var/log/postgresql/postgresql.log
>
>
> What am I doing wrong? Does Postgresql need to be restarted? How can I
> do it?
You probably need the copytruncate option in your logrotate script. The
postmaster does not close its logfile, so it continues to write to the
file you have rotated out.
--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"If we confess our sins, he is faithful and just to
forgive us our sins, and to cleanse us from all
unrighteousness." I John 1:9
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ben Clewett | 2003-04-01 08:21:31 | Export content of a DB |
| Previous Message | Andrei Ivanov | 2003-03-31 18:54:18 | query help request |