Re: pgsql: Use data directory inode number, not port, to select SysV resour

From: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Use data directory inode number, not port, to select SysV resour
Date: 2019-09-06 18:26:13
Message-ID: 14e3c613-6e3c-4908-4873-49898b53100d@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers


On 9/6/19 11:35 AM, Tom Lane wrote:
> Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> writes:
>> On 9/5/19 1:32 PM, Tom Lane wrote:
>>> Use data directory inode number, not port, to select SysV resource keys.
>> This has caused the 017_shm.pl tests to be skipped on jacana and
>> bowerbird, and to fail completely on my msys2 test system where the Perl
>> has the relevant IPC:: modules, unlike the buildfarm animals.
> I intended 017_shm.pl to be skipped on Windows builds; it's not apparent
> to me that that script tests anything useful when we're not using SysV
> shared memory.
>
> I don't quite understand what the msys2 platform might be doing with
> these IPC modules. Do they actually do anything, or just fail at
> runtime? If the latter, maybe we can add something to the eval{}
> block to check for present-but-doesnt-work?

Given your stated intention, I think the simplest way to get it is just
this, without worrying about what the perl modules might do:

diff --git a/src/test/recovery/t/017_shm.pl b/src/test/recovery/t/017_shm.pl
index a29ef78855..dc0dcd3ca2 100644
--- a/src/test/recovery/t/017_shm.pl
+++ b/src/test/recovery/t/017_shm.pl
@@ -18,7 +18,7 @@ eval {
    require IPC::SysV;
    IPC::SysV->import(qw(IPC_CREAT IPC_EXCL S_IRUSR S_IWUSR));
 };
-if ($@)
+if ($@ || $windows_os)
 {
    plan skip_all => 'SysV shared memory not supported by this platform';
 }

cheers

andrew

--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2019-09-06 18:42:06 Re: pgsql: Use data directory inode number, not port, to select SysV resour
Previous Message Tom Lane 2019-09-06 16:10:47 pgsql: Doc: tweak installation doc edits made by commit 76c2af926.

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-09-06 18:42:06 Re: pgsql: Use data directory inode number, not port, to select SysV resour
Previous Message Tom Lane 2019-09-06 18:18:13 Re: add a MAC check for TRUNCATE