Re: Unix-domain socket support on Windows

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Unix-domain socket support on Windows
Date: 2020-01-31 06:10:41
Message-ID: CAMsr+YFe08zz+pysc9AW2ek2NcS9-MfbbYL+VNCEhNoxx1Jgzw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 31 Jan 2020 at 02:41, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> 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
> >> specify one.
> >>
> >> 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_DIR in UNIXSOCK_PATH() could be removed because all
> >> callers already resolve an empty socket directory setting with a
> >> default if appropriate.
>
> > Perhaps this patch is too boring to be reviewed. If there are no
> > objections, I'll commit it soon and then submit the final patches with
> > the real functionality for the next commit fest.
>
> Sorry, I'd paid no particular attention to this thread because
> I figured it'd take a Windows-competent person to review. But
> the patch as it stands isn't that.
>
> 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.

Probably, since it won't work with 'peer' auth from what was said upthread.

--
Craig Ringer http://www.2ndQuadrant.com/
2ndQuadrant - PostgreSQL Solutions for the Enterprise

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2020-01-31 06:12:30 Re: Fetching timeline during recovery
Previous Message Craig Ringer 2020-01-31 06:05:16 Re: MSVC installs too much stuff?