Re: COPYable logs - Mailing list pgsql-patches

From Andrew Dunstan
Subject Re: COPYable logs
Date
Msg-id 46B3D5BE.3010202@dunslane.net
Whole thread Raw
In response to Re: COPYable logs  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: COPYable logs
List pgsql-patches

Tom Lane wrote:
>
> There are two approaches we could take to fixing this:
>
> 1. Redirect_stderr is the start-time flag for both features, ie, if it's
> set we always create both pipes and start the syslogger, but
> Log_destination controls what actually gets used.  (Possibly
> Redirect_stderr should be renamed if we go this way.)
>
> 2. Invent a new PGC_POSTMASTER GUC variable that says whether to create
> the CSV pipe; then the syslogger process is started if either flag is
> set.
>
> #1 seems simpler but it might be too restrictive.  (In particular I'm
> not too sure what happens to the syslogger's own stderr.)
>
>

I'm looking at doing #1, but I'm not sure where I can sensibly check
that redirection is on if cvslog destination is specified. I could check
when elog() is called, but that seems wasteful. Any ideas? I'd hate to
have to fall back on making CSVlogging a PGC_POSTMASTER setting.

cheers

andrew


pgsql-patches by date:

Previous
From: Decibel!
Date:
Subject: Re: Repair cosmetic damage (done by pg_indent?)
Next
From: "Hiroshi Saito"
Date:
Subject: Re: Correction of how to use TimeZone by ControlFile(xlog.c)