Re: Current log files when rotating?

From: Steve Atkins <steve(at)blighty(dot)com>
To: pgsql General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Current log files when rotating?
Date: 2008-11-10 22:30:41
Message-ID: B1B99AC5-EB52-41A8-ABC6-F82509D9DB9A@blighty.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Nov 10, 2008, at 1:35 PM, Tom Lane wrote:

> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
>> It seems that there is enough need for this feature, that it has been
>> implemented multiple times -- but most of them will fail in corner
>> cases. Seems an obvious candidate for an in-core function ...
>
> ... which will still fail in corner cases. Not to mention the race
> condition when the logger has just/is about to switch.

Also, it's going to be a fairly rare app that will need to both
look at the current logfile and access the database, so providing
visibility via a sql function seem clunky.

Maybe just have the logger maintain a symlink to the current
logfile, or log to a static filename and only use a dynamically
generated filename when renaming the log file during rotation?

Cheers,
Steve

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Davis 2008-11-11 01:05:38 ordered pg_dump
Previous Message Joshua D. Drake 2008-11-10 22:16:57 Re: Current log files when rotating?