Re: pg_ctl patch to integrate apache's rotatelogs

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Hammond <ahammond(at)ca(dot)afilias(dot)info>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: pg_ctl patch to integrate apache's rotatelogs
Date: 2004-05-14 20:00:52
Message-ID: 200405142000.i4EK0qT11280@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Andrew Hammond wrote:
> ~From what I've seen, I have to disagree. The documentation says to "pipe
> the stderr of the postmaster to some type of log rotation program."
> which is pretty vague. It then includes an _incorrect_ example of how to
> use logrotate (logrotate rotates existing log files, if you pipe output
> into it, your postmaster will block). There are no explicit, working
> examples of how to configure the various log rotation options.

Ouch. How long has that documentation been wrong? We have pointed
folks to that section of the docs tons of times, and no one mentioned
that "logrotate" is really "rotatelogs", and that it is missing
parameters?

I have applied the following patch to document rotatelogs properly.

Also, the pg_ctl man page should mention rotatelogs too, and the patch
includes that.

> The idea here is to make it as easy as possible to use rotatelogs. The
> script doesn't even test for existance of rotatelogs unless you
> explicitly try to use it. And then, if it can't find rotatelogs, it says
> so explicitly. I think it's an extreemly low risk patch,

This is a powerful argument. I think the big reason we have avoided
rotatelogs integration is the desire not to favor a particular log
rotate solution. However, we have syslog hooks, so maybe rotatelogs
hooks are OK.

Comments?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 3.8 KB

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Hammond 2004-05-14 20:02:43 Re: pg_ctl patch to integrate apache's rotatelogs
Previous Message Bruno Wolff III 2004-05-14 19:48:09 Re: pg_ctl patch to integrate apache's rotatelogs