Re: Unix-domain socket support on Windows

2020-03-30 Thread Peter Eisentraut
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 enou

Re: Unix-domain socket support on Windows

2020-03-27 Thread Andrew Dunstan
On 2/12/20 3:32 AM, Peter Eisentraut wrote: > Here is another patch set to enable this functionality. > > 0001 enables Unix-domain sockets on Windows, but leaves them turned > off by default at run time, using the mechanism introduced by > a9cff89f7e. This is relatively straightforward, except pe

Re: Unix-domain socket support on Windows

2020-02-12 Thread Peter Eisentraut
Here is another patch set to enable this functionality. 0001 enables Unix-domain sockets on Windows, but leaves them turned off by default at run time, using the mechanism introduced by a9cff89f7e. This is relatively straightforward, except perhaps some aesthetic questions about how these diff

Re: Unix-domain socket support on Windows

2020-01-31 Thread Peter Eisentraut
On 2020-01-30 19:41, Tom Lane wrote: The code looks fine (and a big +1 for not having knowledge of DEFAULT_PGSOCKET_DIR wired into UNIXSOCK_PATH). I wonder though whether any user-facing documentation needs to be adjusted. There are no user-facing changes in this patch yet. That will come wit

Re: Unix-domain socket support on Windows

2020-01-30 Thread Craig Ringer
On Fri, 31 Jan 2020 at 02:41, Tom Lane wrote: > > Peter Eisentraut writes: > > On 2019-12-18 14:52, Peter Eisentraut wrote: > >> We have code paths for Unix socket support and no Unix socket support. > >> Now add a third variant: Unix socket support but do not use a Unix > >> socket by default in

Re: Unix-domain socket support on Windows

2020-01-30 Thread Tom Lane
Peter Eisentraut writes: > On 2019-12-18 14:52, Peter Eisentraut wrote: >> We have code paths for Unix socket support and no Unix socket support. >> Now add a third variant: Unix socket support but do not use a Unix >> socket by default in the client or the server, only if you explicitly >> specif

Re: Unix-domain socket support on Windows

2020-01-30 Thread Peter Eisentraut
On 2019-12-18 14:52, Peter Eisentraut wrote: Next patch: This allows building *with* Unix-domain socket support but *without* a default Unix socket path. This is needed because on Windows we don't have a good default location like "/tmp" and we probably don't want Unix sockets by default at run

Re: Unix-domain socket support on Windows

2019-12-18 Thread Peter Eisentraut
On 2019-12-18 15:24, Hamlin, Garick L wrote: On Wed, Dec 18, 2019 at 02:52:15PM +0100, Peter Eisentraut wrote: To implement this, tweak things so that setting DEFAULT_PGSOCKET_DIR to "" has the desired effect. This mostly already worked like that; only a few places needed to be adjusted. Notab

Re: Unix-domain socket support on Windows

2019-12-18 Thread Hamlin, Garick L
On Wed, Dec 18, 2019 at 02:52:15PM +0100, Peter Eisentraut wrote: > To implement this, tweak things so that setting DEFAULT_PGSOCKET_DIR > to "" has the desired effect. This mostly already worked like that; > only a few places needed to be adjusted. Notably, the reference to > DEFAULT_PGSOCKET_DI

Re: Unix-domain socket support on Windows

2019-12-18 Thread Peter Eisentraut
Next patch: This allows building *with* Unix-domain socket support but *without* a default Unix socket path. This is needed because on Windows we don't have a good default location like "/tmp" and we probably don't want Unix sockets by default at run time so that older Windows versions contin

Re: Unix-domain socket support on Windows

2019-12-16 Thread Peter Eisentraut
On 2019-12-16 05:39, Andrew Dunstan wrote: On Wed, Oct 30, 2019 at 10:32 PM Peter Eisentraut wrote: To move this topic a long, I'll submit some preparatory patches in a committable order. First is the patch to deal with getpeereid() that was already included in the previous patch series. Thi

Re: Unix-domain socket support on Windows

2019-12-15 Thread Andrew Dunstan
On Wed, Oct 30, 2019 at 10:32 PM Peter Eisentraut wrote: > > To move this topic a long, I'll submit some preparatory patches in a > committable order. > > First is the patch to deal with getpeereid() that was already included > in the previous patch series. This is just some refactoring that > re

Re: Unix-domain socket support on Windows

2019-10-30 Thread Peter Eisentraut
To move this topic a long, I'll submit some preparatory patches in a committable order. First is the patch to deal with getpeereid() that was already included in the previous patch series. This is just some refactoring that reduces the difference between Windows and other platforms and prepar

Re: Unix-domain socket support on Windows

2019-09-06 Thread Alvaro Herrera from 2ndQuadrant
On 2019-Sep-06, Alvaro Herrera from 2ndQuadrant wrote: > I think you should get 0001 (+0002?) pushed and see what the buildfarm > thinks; move forward from there. ... but of course this goes counter to what you said earlier about 0001 needing to be pushed last. -- Álvaro Herrera

Re: Unix-domain socket support on Windows

2019-09-06 Thread Alvaro Herrera from 2ndQuadrant
On 2019-Sep-03, Peter Eisentraut wrote: > On 2019-09-03 01:45, Thomas Munro wrote: > > fe-connect.obj : error LNK2019: unresolved external symbol getpeereid > > referenced in function PQconnectPoll > > [C:\projects\postgresql\libpq.vcxproj] > > This should be fixed in the attached patches. Minor

Re: Unix-domain socket support on Windows

2019-09-03 Thread Peter Eisentraut
On 2019-09-03 01:45, Thomas Munro wrote: > fe-connect.obj : error LNK2019: unresolved external symbol getpeereid > referenced in function PQconnectPoll > [C:\projects\postgresql\libpq.vcxproj] This should be fixed in the attached patches. -- Peter Eisentraut http://www.2ndQuadrant.c

Re: Unix-domain socket support on Windows

2019-09-02 Thread Thomas Munro
On Wed, Aug 14, 2019 at 6:27 AM Peter Eisentraut wrote: > This patch set needs testers with various Windows versions to test > different configurations, combinations, and versions. It's failing to build on cfbot's AppVeyor setup[1]. That's currently using Windows SDK 7.1, so too old for the new

Re: Unix-domain socket support on Windows

2019-08-13 Thread Peter Eisentraut
On 2019-08-07 15:56, Peter Eisentraut wrote: > Depending on your Windows environment, there might not be a suitable > /tmp directory, so you'll need to specify a directory explicitly using > postgres -k or similar. This leads to the question what the default for > DEFAULT_PGSOCKET_DIR should be on

Re: Unix-domain socket support on Windows

2019-08-07 Thread Magnus Hagander
On Wed, Aug 7, 2019 at 4:59 PM Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 2019-08-07 16:06, Heikki Linnakangas wrote: > > Am I reading the patches correctly, that getpeereid() still doesn't work > > on Windows? That means that peer authentication doesn't work, right? > > That

Re: Unix-domain socket support on Windows

2019-08-07 Thread Peter Eisentraut
On 2019-08-07 16:06, Heikki Linnakangas wrote: > Am I reading the patches correctly, that getpeereid() still doesn't work > on Windows? That means that peer authentication doesn't work, right? > That's a bit sad. One of the big advantages of unix domain sockets over > TCP is peer authentication.

Re: Unix-domain socket support on Windows

2019-08-07 Thread Heikki Linnakangas
On 07/08/2019 16:56, Peter Eisentraut wrote: It works! Cool! Am I reading the patches correctly, that getpeereid() still doesn't work on Windows? That means that peer authentication doesn't work, right? That's a bit sad. One of the big advantages of unix domain sockets over TCP is peer auth