Re: [HACKERS] pg_recvlogical, stdout and SIGHUP

2014-05-15 Thread Heikki Linnakangas
On 05/15/2014 07:59 PM, Andres Freund wrote: On 2014-05-13 17:43:47 +0300, Heikki Linnakangas wrote: 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

Re: [HACKERS] pg_recvlogical, stdout and SIGHUP

2014-05-15 Thread Andres Freund
On 2014-05-13 17:43:47 +0300, Heikki Linnakangas wrote: > 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 rec

Re: [HACKERS] pg_recvlogical, stdout and SIGHUP

2014-05-13 Thread Heikki Linnakangas
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 intent

Re: [HACKERS] pg_recvlogical, stdout and SIGHUP

2014-05-13 Thread Andres Freund
On 2014-05-13 16:31:25 +0300, Heikki Linnakangas wrote: > pg_recvlogical re-opens the output file on SIGHUP. If the output goes to > stdout, it will close stdout on SIGHUP. That's a bug, isn't it? Yes. An annoying one at that because it'll mean a a new connection will use that fd and we'll start w

[HACKERS] pg_recvlogical, stdout and SIGHUP

2014-05-13 Thread Heikki Linnakangas
pg_recvlogical re-opens the output file on SIGHUP. If the output goes to stdout, it will close stdout on SIGHUP. That's a bug, isn't it? 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 se