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

From: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-06 20:41:56
Message-ID: CAC+AXB1V5uXLfgqjY-xUpJ_4QYtiy0Z5azZdhienbR4qOHd6iQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 6, 2019 at 4:38 PM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
wrote:

> On 2019-Nov-05, Michael Paquier wrote:
>
> > On Sun, Nov 03, 2019 at 10:53:00PM -0500, Tom Lane wrote:
> > > That is, TestLib::slurp_file is failing to read a file. Almost
> > > certainly, "permission denied" doesn't really mean a permissions
> > > problem, but failure to specify the file-opening flags needed to
> > > allow concurrent access on Windows. We fixed this in pg_ctl
> > > itself in commit 0ba06e0bf ... but we didn't fix the TAP
> > > infrastructure. Is there an easy way to get Perl on board
> > > with that?
> >
> > If we were to use Win32API::File so as the file is opened in shared
> > mode, we would do the same as what our frontend/backend code does (see
> > $uShare):
> > https://metacpan.org/pod/Win32API::File
>
> Compatibility-wise, that should be okay, since that module appears to
> have been distributed with Perl core early on.
>
>
Please find attached a patch that adds the FILE_SHARE options to
TestLib::slurp_file using Win32API::File.

Regards,

Juan José Santamaría Flecha

Attachment Content-Type Size
0001-tap-file_share-windows-file-access.patch application/x-patch 1.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrzej Barszcz 2019-11-06 21:12:28 question
Previous Message Tomas Vondra 2019-11-06 19:58:49 Re: Using multiple extended statistics for estimates