Re: pgsql: Enable Unix-domain sockets support on Windows

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Enable Unix-domain sockets support on Windows
Date: 2020-06-30 04:13:03
Message-ID: CAA4eK1KUDaeBrGu12WL1nqCxneA7MMCf_ie1S2yUopivwMkwmQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Mon, Jun 29, 2020 at 8:48 PM Andrew Dunstan
<andrew(dot)dunstan(at)2ndquadrant(dot)com> wrote:
>
>
> On 6/28/20 4:33 AM, Peter Eisentraut wrote:
> > On 2020-06-27 13:57, Amit Kapila wrote:
> >> Fair enough, but what should be the behavior in the Windows versions
> >> (<10) where Unix-domain sockets are not supported?
> >
> > You get an error about an unsupported address family, similar to
> > trying to use IPv6 on a system that doesn't support it.
> >
> >> BTW, in which
> >> format the path needs to be specified for unix_socket_directories? I
> >> tried with '/c/tmp', 'c:/tmp', 'tmp' but nothing seems to be working,
> >> it gives me errors like: "could not create lock file
> >> "/c/tmp/.s.PGSQL.5432.lock": No such file or directory" on server
> >> start. I am trying this on Win7 just to check what is the behavior of
> >> this feature on it.
> >
> > Hmm, the only thing I remember about this now is that you need to use
> > native Windows paths, meaning you can't just use /tmp under MSYS, but
> > it needs to be something like C:\something. But the error you have
> > there is not even about the socket file but about the lock file, which
> > is a normal file, so if that goes wrong, it might be an unrelated
> > problem.
> >
>
>
> It needs to be a path from the Windows POV, not an Msys virtualized
> path. So c:/tmp or just /tmp should work, but /c/tmp or similar probably
> will not. The directory needs to exist. I just checked that this is
> working, both in postgresql.conf and on the psql command line.
>

Okay, thanks for the verification. I was trying to see its behavior
on Win7 or a similar environment where this feature is not supported
to see if we get the appropriate error message. If by any chance, you
have access to such an environment, then it might be worth trying on
such an environment once.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2020-06-30 04:26:27 pgsql: Prevent compilation of frontend-only files in src/common/ with b
Previous Message Peter Eisentraut 2020-06-29 23:13:05 pgsql: pgstattuple: Have pgstattuple_approx accept TOAST tables

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2020-06-30 04:13:39 Re: [PATCH] Better cleanup in TLS tests for -13beta2
Previous Message David Rowley 2020-06-30 04:13:01 Use of "long" in incremental sort code