Re: write_pipe_chunks patch messes up early error message output - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: write_pipe_chunks patch messes up early error message output
Date
Msg-id 469B7EE6.5040905@dunslane.net
Whole thread Raw
In response to Re: write_pipe_chunks patch messes up early error message output  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: write_pipe_chunks patch messes up early error message output  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

Tom Lane wrote:
>
> I think offhand that the correct semantics of the flag are "we have
> redirected our original stderr into a pipe for syslogger", and in
> fact that we should transition the output format exactly at the
> instant where we do that; the starting of the child process happens
> at a slightly different time, and restarting of the child (if needed)
> is yet a different issue.
>
>
>   

We could expose syslogger's redirection_done flag, which I think has the 
semantics you want. AFAICS it is never unset once set. (I should note 
that the distance between the point where this is set and where 
SysLoggerPID is set on return from SysLogger_Start is negligible, and no 
logging statements are called there, but I take your point about 
continuing to use chunking during a syslogger restart when SysLoggerPID 
might be 0.)

cheers

andrew


pgsql-hackers by date:

Previous
From: "Zeugswetter Andreas ADI SD"
Date:
Subject: Re: write_pipe_chunks patch messes up early error message output
Next
From: Heikki Linnakangas
Date:
Subject: Dealing with dangling index pointers