From 2e45c143ef5963aa0f705350a017404c9b107f27 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 23 Mar 2004 01:23:48 +0000 Subject: Replace the virtual_host and tcpip_socket parameters with a unified listen_addresses parameter, as per recent discussion. The default behavior is now to listen on localhost, which eliminates the need for the -i postmaster switch in many scenarios. Andrew Dunstan --- doc/src/sgml/client-auth.sgml | 34 ++++++++++------- doc/src/sgml/ref/postmaster.sgml | 35 +++++++++++------- doc/src/sgml/runtime.sgml | 79 ++++++++++++++++++---------------------- 3 files changed, 77 insertions(+), 71 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/client-auth.sgml b/doc/src/sgml/client-auth.sgml index 4b7846e34f6..d93e03f8e5f 100644 --- a/doc/src/sgml/client-auth.sgml +++ b/doc/src/sgml/client-auth.sgml @@ -1,5 +1,5 @@ @@ -112,13 +112,19 @@ hostnossl database user This record matches connection attempts made using TCP/IP. - Note that TCP/IP connections are disabled unless the server is - started with the option or the configuration parameter is - enabled. host records match either + host records match either SSL or non-SSL connection attempts. + + + Remote TCP/IP connections will not be possible unless + the server is started with an appropriate value for the + configuration parameter, + since the default behavior is to listen for TCP/IP connections + only on the local loopback address localhost. + + @@ -126,17 +132,17 @@ hostnossl database user hostssl - This record matches connection attempts made using TCP/IP. In - addition, this record requires that the connection is made with - SSL. + This record matches connection attempts made using TCP/IP, + but only when the connection is made with SSL + encryption. To make use of this option the server must be built with - SSL support enabled. Furthermore, - SSL must be enabled by setting the configuration parameter (see for more information). + SSL support. Furthermore, + SSL must be enabled at server start time + by setting the configuration parameter (see + for more information). @@ -146,8 +152,8 @@ hostnossl database user This record is similar to hostssl but with the - opposite logic: it only matches connection attempts made over - TCP/IP that do not use SSL. + opposite logic: it only matches connection attempts made over + TCP/IP that do not use SSL. diff --git a/doc/src/sgml/ref/postmaster.sgml b/doc/src/sgml/ref/postmaster.sgml index 2affe14d613..cf74272b9bc 100644 --- a/doc/src/sgml/ref/postmaster.sgml +++ b/doc/src/sgml/ref/postmaster.sgml @@ -1,5 +1,5 @@ @@ -165,11 +165,17 @@ PostgreSQL documentation - Specifies the IP host name or address on which the - postmaster is to listen for - connections from client applications. Defaults to - listening on all configured addresses (including - localhost). + Specifies the IP host name or address on which the + postmaster is to listen for TCP/IP + connections from client applications. The value can also be + a space-separated list of addresses, or * to specify + listening on all available interfaces. An empty value specifies + not listening on any IP addresses, in which case only Unix-domain + sockets can be used to connect to the postmaster. + Defaults to listening only + on localhost. + This option is equivalent to setting listen_addresses in + postgresql.conf. @@ -178,14 +184,16 @@ PostgreSQL documentation - Allows clients to connect via TCP/IP (Internet domain) - connections. Without this option, only local Unix domain - socket connections are accepted. This option corresponds - to setting tcpip_socket=true in postgresql.conf. + Allows remote clients to connect via TCP/IP (Internet domain) + connections. Without this option, only local connections are + accepted. This option is equivalent to setting + listen_addresses to * in + postgresql.conf or via - has the opposite - effect of this option. + This option is deprecated since it does not allow access to the + full functionality of listen_addresses. It's usually + better to set listen_addresses directly. @@ -206,8 +214,7 @@ PostgreSQL documentation - Enables secure connections using SSL. The - option is also required. You must have compiled with SSL + Enables secure connections using SSL. You must have compiled with SSL enabled to use this option. diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index 1469d7be532..7b56e192575 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -1,5 +1,5 @@ @@ -186,11 +186,7 @@ $ postmaster -D /usr/local/pgsql/data >logfile 2>&1 & The postmaster also takes a number of other command line options. For more information, see the reference page - and below. In particular, in order - for the server to accept - TCP/IPTCP/IP connections - (rather than just Unix-domain socket ones), you must specify the - option. + and below. @@ -333,7 +329,7 @@ FATAL: could not create TCP/IP listen socket be a different problem. For example, trying to start a postmaster on a reserved port number may draw something like: -$ postmaster -i -p 666 +$ postmaster -p 666 LOG: could not bind IPv4 socket: Permission denied HINT: Is another postmaster already running on port 666? If not, wait a few seconds and retry. FATAL: could not create TCP/IP listen socket @@ -570,19 +566,38 @@ SET ENABLE_SEQSCAN TO OFF; Connection Settings - - - tcpip_socket (boolean) + + + listen_addresses (string) - If this is true, then the server will accept TCP/IP connections.TCP/IP - Otherwise only local Unix domain socket connections are - accepted. It is off by default. This option can only be set at - server start. + Specifies the TCP/IP address(es) on which the server is + to listen for connections from client applications. + The value takes the form of a space-separated list of host names + and/or numeric IP addresses. The special entry * + corresponds to all available IP interfaces. + If the list is empty, the server does not listen on any IP interface + at all, in which case only Unix-domain sockets can be used to connect + to it. + The default value is localhost, + which allows only local loopback connections to be made. + This parameter can only be set at server start. - + + + port (integer) + port + + + The TCP port the server listens on; 5432 by default. Note that the + same port number is used for all IP addresses the server listens on. + This parameter can only be set at server start. + + + + max_connections (integer) @@ -628,17 +643,6 @@ SET ENABLE_SEQSCAN TO OFF; - - port (integer) - port - - - The TCP port the server listens on; 5432 by default. This - option can only be set at server start. - - - - unix_socket_directory (string) @@ -648,6 +652,7 @@ SET ENABLE_SEQSCAN TO OFF; server is to listen for connections from client applications. The default is normally /tmp, but can be changed at build time. + This parameter can only be set at server start. @@ -701,27 +706,15 @@ SET ENABLE_SEQSCAN TO OFF; - - - virtual_host (string) - - - Specifies the IP address(es) on which the server is - to listen for connections from client applications. If specified, - it takes the form of a space-separated list of host names and/or - numeric IP addresses. If the list is empty, the server listens - on all available addresses (including - localhost). - - - rendezvous_name (string) Specifies the Rendezvous broadcast name. By default, the - computer name is used, specified as ''. + computer name is used, specified as an empty string ''. + This option is only meaningful on platforms that support Rendezvous. + This option can only be set at server start. @@ -3009,11 +3002,11 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir' - virtual_host = x + listen_addresses = x - tcpip_socket = on + listen_addresses = '*' -- cgit v1.2.3