pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: pgsql: Enable Unix-domain sockets support on Windows
Date: Mon, 29 Jun 2020 11:17:58 -0400
Message-ID: <c1428bf3-e081-5846-30ca-d4e52bdf65b7@2ndQuadrant.com> (raw)
In-Reply-To: <bb7422d1-15cf-b26b-4e63-2660c8e324eb@2ndquadrant.com>
References: <E1jIC71-0000lT-0O@gemulon.postgresql.org>
	<CAA4eK1KARhb46yDoSuDW6kM0U6efKqRwyMrnr1SMes=_+1jcWA@mail.gmail.com>
	<88ae9594-6177-fa3c-0061-5bf8f8044b21@2ndquadrant.com>
	<CAA4eK1KaTu3_CTAdKON_P4FB=-uvNkviJpqYkhLFcmb8xZkk_Q@mail.gmail.com>
	<bb7422d1-15cf-b26b-4e63-2660c8e324eb@2ndquadrant.com>


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.


cheers


andrew



-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services






view thread (9+ messages)  latest in thread

Message-ID: <c1428bf3-e081-5846-30ca-d4e52bdf65b7@2ndQuadrant.com>
Permalink:  ../c1428bf3-e081-5846-30ca-d4e52bdf65b7@2ndQuadrant.com/
Also on:    postgresql.org/message-id/c1428bf3-e081-5846-30ca-d4e52bdf65b7@2ndQuadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andrew.dunstan@2ndquadrant.com, peter.eisentraut@2ndquadrant.com, amit.kapila16@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: pgsql: Enable Unix-domain sockets support on Windows
  In-Reply-To: <c1428bf3-e081-5846-30ca-d4e52bdf65b7@2ndQuadrant.com>
  References: <E1jIC71-0000lT-0O@gemulon.postgresql.org> <CAA4eK1KARhb46yDoSuDW6kM0U6efKqRwyMrnr1SMes=_+1jcWA@mail.gmail.com> <88ae9594-6177-fa3c-0061-5bf8f8044b21@2ndquadrant.com> <CAA4eK1KaTu3_CTAdKON_P4FB=-uvNkviJpqYkhLFcmb8xZkk_Q@mail.gmail.com> <bb7422d1-15cf-b26b-4e63-2660c8e324eb@2ndquadrant.com> <c1428bf3-e081-5846-30ca-d4e52bdf65b7@2ndQuadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox