Commit 580a446c authored by Peter Eisentraut's avatar Peter Eisentraut

doc: Update for Unix-domain sockets on Windows

Update the documentation to reflect that Unix-domain sockets are now
usable on Windows.
parent c6e0edad
...@@ -751,6 +751,8 @@ include_dir 'conf.d' ...@@ -751,6 +751,8 @@ include_dir 'conf.d'
only TCP/IP sockets can be used to connect to the server. only TCP/IP sockets can be used to connect to the server.
The default value is normally The default value is normally
<filename>/tmp</filename>, but that can be changed at build time. <filename>/tmp</filename>, but that can be changed at build time.
On Windows, the default is empty, which means no Unix-domain socket is
created by default.
This parameter can only be set at server start. This parameter can only be set at server start.
</para> </para>
...@@ -762,11 +764,6 @@ include_dir 'conf.d' ...@@ -762,11 +764,6 @@ include_dir 'conf.d'
created in each of the <varname>unix_socket_directories</varname> directories. created in each of the <varname>unix_socket_directories</varname> directories.
Neither file should ever be removed manually. Neither file should ever be removed manually.
</para> </para>
<para>
This parameter is irrelevant on Windows, which does not have
Unix-domain sockets.
</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -789,8 +786,8 @@ include_dir 'conf.d' ...@@ -789,8 +786,8 @@ include_dir 'conf.d'
</para> </para>
<para> <para>
This parameter is irrelevant on Windows, which does not have This parameter is not supported on Windows. Any setting will be
Unix-domain sockets. ignored.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -836,8 +833,6 @@ include_dir 'conf.d' ...@@ -836,8 +833,6 @@ include_dir 'conf.d'
10, that ignore socket permissions entirely. There, one can achieve a 10, that ignore socket permissions entirely. There, one can achieve a
similar effect by pointing <varname>unix_socket_directories</varname> to a similar effect by pointing <varname>unix_socket_directories</varname> to a
directory having search permission limited to the desired audience. directory having search permission limited to the desired audience.
This parameter is also irrelevant on Windows, which does not have
Unix-domain sockets.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
......
...@@ -959,8 +959,9 @@ postgresql://[2001:db8::1234]/database ...@@ -959,8 +959,9 @@ postgresql://[2001:db8::1234]/database
<para> <para>
The host component is interpreted as described for the parameter <xref The host component is interpreted as described for the parameter <xref
linkend="libpq-connect-host"/>. In particular, a Unix-domain socket linkend="libpq-connect-host"/>. In particular, a Unix-domain socket
connection is chosen if the host part is either empty or starts with a connection is chosen if the host part is either empty or looks like an
slash, otherwise a TCP/IP connection is initiated. Note, however, that the absolute path name,
otherwise a TCP/IP connection is initiated. Note, however, that the
slash is a reserved character in the hierarchical part of the URI. So, to slash is a reserved character in the hierarchical part of the URI. So, to
specify a non-standard Unix-domain socket directory, either omit the host specify a non-standard Unix-domain socket directory, either omit the host
specification in the URI and specify the host as a parameter, or specification in the URI and specify the host as a parameter, or
...@@ -1035,16 +1036,19 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname ...@@ -1035,16 +1036,19 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
<term><literal>host</literal></term> <term><literal>host</literal></term>
<listitem> <listitem>
<para> <para>
Name of host to connect to.<indexterm><primary>host name</primary></indexterm> Name of host to connect to.<indexterm><primary>host
If a host name begins with a slash, it specifies Unix-domain name</primary></indexterm> If a host name looks like an absolute path
communication rather than TCP/IP communication; the value is the name, it specifies Unix-domain communication rather than TCP/IP
name of the directory in which the socket file is stored. communication; the value is the name of the directory in which the
The default behavior when <literal>host</literal> is socket file is stored. (On Unix, an absolute path name begins with a
not specified, or is empty, is to connect to a Unix-domain slash. On Windows, paths starting with drive letters are also
recognized.) The default behavior when <literal>host</literal> is not
specified, or is empty, is to connect to a Unix-domain
socket<indexterm><primary>Unix domain socket</primary></indexterm> in socket<indexterm><primary>Unix domain socket</primary></indexterm> in
<filename>/tmp</filename> (or whatever socket directory was specified <filename>/tmp</filename> (or whatever socket directory was specified
when <productname>PostgreSQL</productname> was built). On machines without when <productname>PostgreSQL</productname> was built). On Windows and
Unix-domain sockets, the default is to connect to <literal>localhost</literal>. on machines without Unix-domain sockets, the default is to connect to
<literal>localhost</literal>.
</para> </para>
<para> <para>
A comma-separated list of host names is also accepted, in which case A comma-separated list of host names is also accepted, in which case
...@@ -1123,8 +1127,8 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname ...@@ -1123,8 +1127,8 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
</para> </para>
<para> <para>
Without either a host name or host address, Without either a host name or host address,
<application>libpq</application> will connect using a <application>libpq</application> will connect using a local
local Unix-domain socket; or on machines without Unix-domain Unix-domain socket; or on Windows and on machines without Unix-domain
sockets, it will attempt to connect to <literal>localhost</literal>. sockets, it will attempt to connect to <literal>localhost</literal>.
</para> </para>
</listitem> </listitem>
......
...@@ -751,7 +751,7 @@ psql --username=postgres --file=script.sql postgres ...@@ -751,7 +751,7 @@ psql --username=postgres --file=script.sql postgres
can use the <option>-s</option> option to put the socket files in some can use the <option>-s</option> option to put the socket files in some
directory with a shorter path name. For security, be sure that that directory with a shorter path name. For security, be sure that that
directory is not readable or writable by any other users. directory is not readable or writable by any other users.
(This is not relevant on Windows.) (This is not supported on Windows.)
</para> </para>
<para> <para>
......
...@@ -169,7 +169,7 @@ last started with</entry> ...@@ -169,7 +169,7 @@ last started with</entry>
cluster data directory path, cluster data directory path,
postmaster start timestamp, postmaster start timestamp,
port number, port number,
Unix-domain socket directory path (empty on Windows), Unix-domain socket directory path (could be empty),
first valid listen_address (IP address or <literal>*</literal>, or empty if first valid listen_address (IP address or <literal>*</literal>, or empty if
not listening on TCP), not listening on TCP),
and shared memory segment ID and shared memory segment ID
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment