| From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
|---|---|
| To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
| Cc: | Adam Lee <ali(at)pivotal(dot)io>, "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-27 06:30:08 |
| Message-ID: | CA+TgmoaS9-QxSRKrrFUMBkAbFxYsUT+BJT5Ea4qtQi50u4VHCg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Dec 26, 2017 at 7:51 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
>> > 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.
>>
>> That is doable, just stat() and check before open().
>
> I think TOCTOU when I read such things.. The data folder is a trusted
> environment but any patches doing things like that ought to be careful.
Yeah. I was more wondering whether an ostensibly non-blocking open()
would nevertheless block on an inaccessible file.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2017-12-27 06:39:39 | Re: Observations in Parallel Append |
| Previous Message | Masahiko Sawada | 2017-12-27 05:38:28 | Re: [HACKERS] Transactions involving multiple postgres foreign servers |