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 469CDF80.7010907@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:
> Andrew Dunstan <andrew@dunslane.net> writes:
>   
>> 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",
>>>       
>
>   
>> We could expose syslogger's redirection_done flag, which I think has the 
>> semantics you want.
>>     
>
> Yeah, that would work.  You'd have to get rid of the current ad-hoc
> method by which it is propagated to the syslogger child process
> (EXEC_BACKEND case), because now it will have to be propagated to all
> children; so postmaster.c should handle it in BackendParameters.
>
>     
>   


The problem with this as it stands is that the syslogger itself is 
forked before the redirection is done. I guess we need to make sure the 
syslogger itself never calls write_pipe_chunks() - which makes sense 
anyway - should probably call write_syslogger_file() directly, I think.

cheers

andrew


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Invalid to_date patterns (was: [PATCHES] [GENERAL] ISO week dates)
Next
From: Zdenek Kotala
Date:
Subject: Re: compiler warnings on the buildfarm