Re: Should we nonblocking open FIFO files in COPY?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Adam Lee <ali(at)pivotal(dot)io>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnakangas(at)pivotal(dot)io>, Daniel Gustafsson <dgustafsson(at)pivotal(dot)io>, Ming Li <mli(at)pivotal(dot)io>
Subject: Re: Should we nonblocking open FIFO files in COPY?
Date: 2017-12-26 19:48:58
Message-ID: CA+TgmobJJKwrTs6oKw4mgBp8XFiMtSQCxPY0JPEPjkbk35N6+w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 21, 2017 at 10:10 PM, Adam Lee <ali(at)pivotal(dot)io> wrote:
> I have an issue that COPY from a FIFO, which has no writers, could not be
> canceled, because COPY invokes AllocateFile() -> fopen() -> blocking open().

Hmm. What about the case where we try to open a plain file that's on
an inaccessible filesystem, e.g. due to a disk failure? Allowing
cancel to work just for FIFOs would be OK, I guess, but allowing it
for other open() calls that hang would be better. I'm not sure if we
can make it work that way, but it would be nice if we could.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-12-26 20:28:09 Re: [JDBC] [HACKERS] Channel binding support for SCRAM-SHA-256
Previous Message Robert Haas 2017-12-26 19:29:03 Re: [HACKERS] pow support for pgbench