Re: TAP tests aren't using the magic words for Windows file access

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: TAP tests aren't using the magic words for Windows file access
Дата
Msg-id 20191107033158.GH1768@paquier.xyz
обсуждение исходный текст
Ответ на Re: TAP tests aren't using the magic words for Windows file access  (Thomas Munro <thomas.munro@gmail.com>)
Ответы Re: TAP tests aren't using the magic words for Windows file access  (Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>)
Список pgsql-hackers
On Thu, Nov 07, 2019 at 11:13:32AM +1300, Thomas Munro wrote:
> Not a Windows or Perl person, but I see that you can redefine core
> functions with *CORE::GLOBAL::open = <replacement/wrapper>, if you
> wanted to make a version of open() that does that FILE_SHARE_READ
> dance.

FWIW, I would have gone with a solution like that, say within
TestLib.pm's INIT.  This ensures that any new future tests don't fall
into that trap again.

> Alternatively we could of course have our own xxx_open() function
> and use that everywhere, but that might be more distracting.

That does not sound really appealing.

> I'm a bit surprised that there doesn't seem to be a global switch
> thing you can set somewhere to make it do that anyway.  Doesn't
> everyone eventually figure out that all files really want to be
> shared?

I guess it depends on your requirements.  Looking around I can see
some mention about flock() but it does not solve the problem at the
time the fd is opened.  If this does not exist, then it seems to me
that we have very special requirements for our perl code, and that
these are not popular.
--
Michael

Вложения

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

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: [HACKERS] Block level parallel vacuum
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Problem during Windows service start