Re: [HACKERS] Weaker shmem interlock w/o postmaster.pid

From: Noah Misch <noah(at)leadboat(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, "9erthalion6(at)gmail(dot)com" <9erthalion6(at)gmail(dot)com>, "sfrost(at)snowman(dot)net" <sfrost(at)snowman(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Weaker shmem interlock w/o postmaster.pid
Date: 2019-05-01 00:57:11
Message-ID: 20190501005711.GA503996@rfd.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 30, 2019 at 10:47:37PM +1200, Thomas Munro wrote:
> On Mon, Apr 22, 2019 at 4:59 AM Noah Misch <noah(at)leadboat(dot)com> wrote:
> > On Thu, Apr 18, 2019 at 04:30:46PM +1200, Thomas Munro wrote:
> > > This causes make check-world to deliver a flurry of pop-ups from
> > > macOS's built-in Firewall asking if perl should be allowed to listen
> > > to all interfaces [...].
> >
> > That is unfortunate. The "Allowing specific applications" section of
> > https://support.apple.com/en-us/HT201642 appears to offer a way to allow perl
> > permanently. Separately, it wouldn't cost much for us to abandon that check
> > on !$use_tcp (non-Windows) configurations.
>
> My system is set up not to allow that and I suppose I could go and
> argue with my IT department about that, but I'm interested in your
> second suggestion if the test is in fact not serving any useful
> purpose for non-Windows systems anyway. Do you mean like this?
>
> --- a/src/test/perl/PostgresNode.pm
> +++ b/src/test/perl/PostgresNode.pm
> @@ -1098,17 +1098,12 @@ sub get_new_node
> # native Perl (https://stackoverflow.com/a/14388707),
> so we also test
> # individual addresses.
> #
> - # This seems like a good idea on Unixen as well, even
> though we don't
> - # ask the postmaster to open a TCP port on Unix. On Non-Linux,
> - # non-Windows kernels, binding to 127.0.0.1/24
> addresses other than
> - # 127.0.0.1 fails with EADDRNOTAVAIL.
> - #

Deleting that comment paragraph isn't quite right, since we're still testing
127.0.0.1 everywhere. The paragraph does have cause to change.

> # XXX A port available now may become unavailable by
> the time we start
> # the postmaster.
> if ($found == 1)
> {
> - foreach my $addr (qw(127.0.0.1 0.0.0.0),
> - $use_tcp ? qw(127.0.0.2 127.0.0.3) : ())
> + foreach my $addr (qw(127.0.0.1),
> + $use_tcp ? qw(0.0.0.0 127.0.0.2 127.0.0.3) : ())

This is what I meant, yes.

> {
> can_bind($addr, $port) or $found = 0;
> }

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2019-05-01 00:58:35 Re: Improve search for missing parent downlinks in amcheck
Previous Message Robert Haas 2019-05-01 00:35:04 Re: Initializing LWLock Array from Server Code