Re: pg_recvlogical, stdout and SIGHUP

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: pg_recvlogical, stdout and SIGHUP
Дата
Msg-id 53722FA3.9070005@vmware.com
обсуждение исходный текст
Ответ на Re: pg_recvlogical, stdout and SIGHUP  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: pg_recvlogical, stdout and SIGHUP
Список pgsql-hackers
On 05/13/2014 04:35 PM, Andres Freund wrote:
> On 2014-05-13 16:31:25 +0300, Heikki Linnakangas wrote:
>> Another thing I noticed is that if when the output goes to a file, the file
>> isn't re-opened immediately on SIGHUP. Only after receiving some data from
>> the server. I believe that's also not intentional.
>
> Hm. I can't really get excited about that one. Not doing that seems to
> complicate matters unneccessarily. What's the problem here?

Not sure if it matters in any real-world scenario, but I found it pretty 
surprising while playing with it. It should be trivial to fix; ISTM the 
problem is that there is a "continue" in the loop when select() is 
interrupted by signal, but the re-opening is done after the select() in 
the loop. I think all you need to do is move the check for output_reopen 
to the beginning of the loop.

- Heikki



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 9.5: UPDATE/DELETE .. ORDER BY .. LIMIT ..
Следующее
От: Christoph Berg
Дата:
Сообщение: Re: New timezones used in regression tests