Re: serverlog rotation/functions - Mailing list pgsql-patches

From Tom Lane
Subject Re: serverlog rotation/functions
Date
Msg-id 18934.1089754606@sss.pgh.pa.us
Whole thread Raw
In response to Re: serverlog rotation/functions  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: serverlog rotation/functions
Re: serverlog rotation/functions
List pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> However, looking at the issue of backends all reloading their
> postgresql.conf files at different times and sending output to different
> files, I wonder if it would be best to create a log process and have
> each backend connect to that.  That way, all the logging happens in one
> process.

That was something that bothered me too.  I think in the patch as given,
the GUC parameter determining the logfile name would have to be
PGC_POSTMASTER, ie, you could not change it on the fly because the
backends wouldn't all switch together.   There may be some finer-grain
timing issues as well.

On the whole I think that capturing all the backends' stderr via a pipe
and doing the file rotation in a single downstream process is a *much*
cleaner solution.  However, I've been saying that right along and
haven't been listened to...

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Is "trust" really a good default?
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Is "trust" really a good default?