Обсуждение: unix domain sockets on Windows.

Поиск
Список
Период
Сортировка

unix domain sockets on Windows.

От
Jeff Rule
Дата:
Does the postgres server support listening on unix domain sockets on windows?  It seems to me that they do not, but
thisis not called out directly in the documentation. 

Listen_address in postgresql.conf

    listen_addresses = ''      # what IP address(es) to listen on;
                        # comma-separated list of addresses;
                        # defaults to 'localhost', '*' = all
                        # (change requires restart)

The online documentation for listen_address is not specific about whether windows does or does not support unix-domain
sockets.

In pg_hba.conf documentation for local connections (unix domain sockets) we see the following

    local
        This record matches connection attempts using Unix-domain sockets. Without a record of this type, Unix-domain
socketconnections are disallowed. 

Basically I am wondering if the postgres code substitutes some other windows facility for this functionality.

We do see some notes that certain related parameters (unix_socket_directory (string), unix_socket_group (string),
unix_socket_permissions(integer)) are not supported on windows but nothing with the basic configuration information. 

I have tried to start a server with this configuration an received the following error..

pg_ctl: another server might be running; trying to start server anyway
2011-12-31 16:35:38 PST FATAL:  no socket created for listening
server starting

Just looking for a definatative yes or no if this configuration is supported.




Get Connected.
Save the Date for DemandBetter 2012
June 11-13 | San Francisco
www.demandtec.com/db12

******************************************************************

DemandTec Email Notice
This email and any attachments may contain confidential and/or proprietary
information and is intended solely for the use of the addressee. If you are not
the intended recipient we request that you notify us via email or telephone and
delete all copies of the message from your systems. Additionally, although
DemandTec has taken reasonable precautions to ensure the security of this
email and any attachments, we encourage you to take similar precautions and
accept no liability for any loss or damage resulting from its use.

DemandTec, 1 Franklin Parkway, Building 910, San Mateo, CA 94403-1906, 650-645-7100

Re: unix domain sockets on Windows.

От
Peter Eisentraut
Дата:
On lör, 2011-12-31 at 17:06 -0800, Jeff Rule wrote:
> Does the postgres server support listening on unix domain sockets on windows?

No.

> It seems to me that they do not, but this is not called out directly in the documentation.
>
> Listen_address in postgresql.conf
>
>     listen_addresses = ''      # what IP address(es) to listen on;
>                         # comma-separated list of addresses;
>                         # defaults to 'localhost', '*' = all
>                         # (change requires restart)

It says right there that it controls what *IP addresses* to listen to.
It does not have anything to do with Unix-domain sockets.  There are
other options that control whether and where those are created.



Re: unix domain sockets on Windows.

От
Jeff Rule
Дата:
Peter Thanks for the definitive yes/no answer on the windows platform issue.

What was confusing was that the online manual does make references to the listen_addresses having a relationship to
unix-domainsockets.
 

--------------------

9.1 (18.3. Connections and Authentication)

listen_addresses (string)

Specifies the TCP/IP address(es) on which the server is to listen for connections from client applications. The value
takesthe form of a comma-separated list of host names and/or numeric IP addresses. The special entry * corresponds to
allavailable IP interfaces. The entry 0.0.0.0 allows listening for all IPv4 addresses and :: allows listening for all
IPv6addresses. If the list is empty, the server does not listen on any IP interface at all, in which case only
Unix-domainsockets can be used to connect to it. The default value is localhost, which allows only local TCP/IP
"loopback"connections to be made. While client authentication (Chapter 19) allows fine-grained control over who can
accessthe server, listen_addresses controls which interfaces accept connection attempts, which can help prevent
repeatedmalicious connection requests on insecure network interfaces. This parameter can only be set at server start.
 

-------------------

The relevant line being: If the list is empty, the server does not listen on any IP interface at all, in which case
onlyUnix-domain sockets can be used to connect to it.
 

Upon re-reading this I don't think the intent was to imply that setting the list to empty would create one, just that
ifyou did set it to empty the only possible connection method left would be a linux domain socket.
 

After some testing and documentation digging I think the real trigger for creating a domain socket is if you have one
ormore 'local' entries in the pg_hba.conf file.  W/O a local line all connections on unix-domain sockets would be
rejectedanyway so one is not created.  I can't find any other parameter that turns them on or off directly.  However, I
wouldnot be surprised if there is one.  There are so many parameters it is quite easy to miss one.
 

-Jeff

-----Original Message-----
From: Peter Eisentraut [mailto:peter_e@gmx.net]
Sent: Sunday, January 01, 2012 7:21 AM
To: Jeff Rule
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] unix domain sockets on Windows.

On lör, 2011-12-31 at 17:06 -0800, Jeff Rule wrote:
> Does the postgres server support listening on unix domain sockets on windows?

No.

> It seems to me that they do not, but this is not called out directly in the documentation.
>
> Listen_address in postgresql.conf
>
>     listen_addresses = ''      # what IP address(es) to listen on;
>                         # comma-separated list of addresses;
>                         # defaults to 'localhost', '*' = all
>                         # (change requires restart)

It says right there that it controls what *IP addresses* to listen to.
It does not have anything to do with Unix-domain sockets.  There are other options that control whether and where those
arecreated.
 




Get Connected.
Save the Date for DemandBetter 2012
June 11-13 | San Francisco
www.demandtec.com/db12

******************************************************************

DemandTec Email Notice
This email and any attachments may contain confidential and/or proprietary
information and is intended solely for the use of the addressee. If you are not
the intended recipient we request that you notify us via email or telephone and
delete all copies of the message from your systems. Additionally, although
DemandTec has taken reasonable precautions to ensure the security of this
email and any attachments, we encourage you to take similar precautions and
accept no liability for any loss or damage resulting from its use.

DemandTec, 1 Franklin Parkway, Building 910, San Mateo, CA 94403-1906, 650-645-7100