Re: Unix-domain socket support on Windows

Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-03-30T15:43:12Z
Lists: pgsql-hackers
On 2020-03-27 18:52, Andrew Dunstan wrote:
> I have tested this on drongo/fairywren and it works fine. The patches
> apply cleanly (with a bit of fuzz) and a full buildfarm run is happy in
> both cases.
> 
> Unfortunately I don't have a Windows machine that's young enough to
> support git master and old enough not to support Unix Domain sockets, so
> i can't test that with socket-enabled binaries.
> 
> On inspection the patches seem fine.
> 
> Let's commit this and keep working on the pg_upgrade and test issues.

I have committed this in chunks over the last couple of days.  It's done 
now.

I didn't commit the initdb auto-detection patch.  As I mentioned 
earlier, that one is probably not necessary.

Btw., the default AppVeyor images are too old to support this.  You need 
something like 'image: Visual Studio 2019' to get a new enough image. 
So that's one way to test what happens when it's not supported at run 
time.  (I did test it and you get a sensible error message.)

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Commits

  1. Allow using Unix-domain sockets on Windows in tests

  2. pg_regress: Observe TMPDIR

  3. Enable Unix-domain sockets support on Windows

  4. psql: Remove one use of HAVE_UNIX_SOCKETS

  5. Allow building without default socket directory

  6. Sort out getpeereid() and peer auth handling on Windows