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

Noah Misch <noah@leadboat.com>

From: Noah Misch <noah@leadboat.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Daniel Gustafsson <daniel@yesql.se>, Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>, "9erthalion6@gmail.com" <9erthalion6@gmail.com>, "sfrost@snowman.net" <sfrost@snowman.net>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2019-04-21T16:59:03Z
Lists: pgsql-hackers
On Thu, Apr 18, 2019 at 04:30:46PM +1200, Thomas Munro wrote:
> On Thu, Apr 11, 2019 at 6:22 PM Noah Misch <noah@leadboat.com> wrote:
> >  -                       my $iaddr = inet_aton($test_localhost);
> > +                       my $iaddr = inet_aton('0.0.0.0');
> 
> 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 (well I didn't catch the exact message, but that's
> probably the drift).  Not sure if they'd go away permanently if I
> managed to click OK before they disappear, but it's fun trying.  The
> silly firewall facility is not actually enabled by default on this OS,
> but unfortunately this company-issued machine has it forced to on.
> This isn't really an objection to the code, it's more of a bemused
> anecdote about a computer that can't decide whether it's a Unix
> workstation or a Fisher Price My First Computer.

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.



Commits

  1. Probe only 127.0.0.1 when looking for ports on Unix.

  2. Don't write to stdin of a test process that could have already exited.

  3. Test both 0.0.0.0 and 127.0.0.x addresses to find a usable port.

  4. MSYS: Translate REGRESS_SHLIB to a Windows file name.

  5. MSYS: Skip src/test/recovery/t/017_shm.pl.

  6. When Perl "kill(9, ...)" fails, try "pg_ctl kill".

  7. Consistently test for in-use shared memory.

  8. Revert "Consistently test for in-use shared memory."

  9. Silence -Wimplicit-fallthrough in sysv_shmem.c.

  10. Make src/test/recovery/t/017_shm.pl safe for concurrent execution.

  11. Update HINT for pre-existing shared memory block.

  12. Add WL_EXIT_ON_PM_DEATH pseudo-event.

  13. The default values for shared_buffers and max_connections are now 1000

  14. XLOG (and related) changes:

  15. Significant cleanups in SysV IPC handling (shared mem and semaphores).