Re: write_pipe_chunks patch messes up early error message output

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: write_pipe_chunks patch messes up early error message output
Дата
Msg-id 469B740E.2020507@dunslane.net
обсуждение исходный текст
Ответ на Re: write_pipe_chunks patch messes up early error message output  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: write_pipe_chunks patch messes up early error message output
Список pgsql-hackers

Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>   
>> Is there any reason we can't just use a check on whether SysLoggerPID is 
>> not 0?
>>     
>
> (a) that really shouldn't be exported out of postmaster.c, and (b) it is
> not readily available to child backends is it?
>
>     
>   

It's already used in elog.c in Win32 code:
       if ((!Redirect_stderr || am_syslogger ||            (!IsUnderPostmaster && SysLoggerPID==0)) && 
pgwin32_is_service())           write_eventlog(edata->elevel, buf.data);

Child backends might have an out of date version if we restart the 
Syslogger, but would that matter in this case? For current purposes all 
we need is to know that the syslogger has in fact started, ISTM.

If that makes you puke we can do something more elegant, but I suspect 
it will amount to the same thing.

cheers

andrew




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: write_pipe_chunks patch messes up early error message output
Следующее
От: Tom Lane
Дата:
Сообщение: Re: write_pipe_chunks patch messes up early error message output