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

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Hang issue when COPY to/from an unopened FIFO
Дата
Msg-id 20160714184034.cos4nulxszdlylih@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Hang issue when COPY to/from an unopened FIFO  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2016-07-14 10:20:42 -0400, Tom Lane wrote:
> Kenan Yao <kyao@pivotal.io> 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-client.
> We're certainly not going to want to add any overhead to the COPY code
> paths in order to allow it.

Agreed on that.

Said overhead would be a good reason to get rid of using buffered IO at
some point though - we're doing our own buffering anyway, and the stream
code adds noticeable overhead (doubles the cache footprint
basically). Even worse, it uses locking internally on many
platforms... In that case adding sane EINTR handling seems trivial.

Andres



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Reviewing freeze map code
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [PERFORM] 9.4 -> 9.5 regression with queries through pgbouncer on RHEL 6