From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: TAP tests aren't using the magic words for Windows file access |
Date: | 2019-11-07 03:31:58 |
Message-ID: | 20191107033158.GH1768@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2019-11-07 03:55:13 | Re: Problem during Windows service start |
Previous Message | Dilip Kumar | 2019-11-07 03:07:03 | Re: [HACKERS] Block level parallel vacuum |