Re: [HACKERS] Hang issue when COPY to/from an unopened FIFO

2016-07-14 Thread Andres Freund
On 2016-07-14 10:20:42 -0400, Tom Lane wrote: > Kenan Yao writes: > > -- mkfifo /tmp/test.dat # bash > > copy pg_class to '/tmp/test.dat'; > > -- try pg_cancel_backend or pg_terminate_backend from other sessions > > This does not seem like a supported case to me. I see few if any reasons > to wa

Re: [HACKERS] Hang issue when COPY to/from an unopened FIFO

2016-07-14 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Kenan Yao writes: > > -- mkfifo /tmp/test.dat # bash > > copy pg_class to '/tmp/test.dat'; > > -- try pg_cancel_backend or pg_terminate_backend from other sessions > > This does not seem like a supported case to me. I see few if any reasons > to want to d

Re: [HACKERS] Hang issue when COPY to/from an unopened FIFO

2016-07-14 Thread Tom Lane
Kenan Yao writes: > -- mkfifo /tmp/test.dat # bash > copy pg_class to '/tmp/test.dat'; > -- try pg_cancel_backend or pg_terminate_backend from other sessions This does not seem like a supported case to me. I see few if any reasons to want to do that rather than doing copy-to-program or copy-to-c

[HACKERS] Hang issue when COPY to/from an unopened FIFO

2016-07-14 Thread Kenan Yao
Hi devs, I came across a hang issue when COPY to a FIFO file, because the FIFO is not opened for read on the other end. The backtrace from master branch is like: #0 0x00332ccc6c30 in __open_nocancel () from /lib64/libc.so.6 #1 0x00332cc6b693 in __GI__IO_file_open () from /lib64/libc.so.