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

From Bruce Momjian
Subject Re: serverlog rotation/functions
Date
Msg-id 200407141450.i6EEo3R08412@candle.pha.pa.us
Whole thread Raw
In response to Re: serverlog rotation/functions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
We could make the same adjustments when opening a new log file rather
than pipe, no?

---------------------------------------------------------------------------

Tom Lane wrote:
> I wrote:
> >     close(2);
> >     d = dup(p[0]);
> >     Assert(d == 2);
>
> Having re-read the pipe(2) man page, of course that should be
>     d = dup(p[1]);
> since it's the writing end of the pipe you want to plug stderr into.
>
> BTW, if it wasn't clear: I'd do the same pushup for stdout too,
> just in case.  I'm not sure there is any output to stdout left in the
> backend, but I wouldn't swear there is not, either.
>
>             regards, tom lane
>

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

pgsql-patches by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Better fixes for pg_dump bugs
Next
From: Bruce Momjian
Date:
Subject: Re: PITR Archive Recovery plus WIP PITR