Re: Should we nonblocking open FIFO files in COPY?

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Should we nonblocking open FIFO files in COPY?
Дата
Msg-id CA+TgmoaS9-QxSRKrrFUMBkAbFxYsUT+BJT5Ea4qtQi50u4VHCg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Should we nonblocking open FIFO files in COPY?  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Should we nonblocking open FIFO files in COPY?  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Tue, Dec 26, 2017 at 7:51 PM, Michael Paquier
<michael.paquier@gmail.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


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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: [HACKERS] Transactions involving multiple postgres foreign servers
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Observations in Parallel Append