listen for connections from client applications.
The value takes the form of a comma-separated list of host names
and/or numeric IP addresses. The special entry <literal>*</literal>
corresponds to all available IP interfaces. The entry
<literal>0.0.0.0</literal> allows listening for all IPv4 addresses and
<literal>::</literal> allows listening for all IPv6 addresses.
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. If the list is not empty, the server will start if it
can listen on at least one TCP/IP address. A warning will be
emitted for any TCP/IP address which cannot be opened.
The default value is <systemitem class="systemname">localhost</systemitem>,
which allows only local TCP/IP <quote>loopback</quote> connections to be
made.
</para>
<para>
While client authentication (<xref
linkend="client-authentication"/>) allows fine-grained control
over who can access the server, <varname>listen_addresses</varname>
controls which interfaces accept connection attempts, which
can help prevent repeated malicious connection requests on
insecure network interfaces. This parameter can only be set
at server start.
</para>
</listitem>
</varlistentry>
<varlistentry id="guc-port" xreflabel="port">
<term><varname>port</varname> (<type>integer</type>)
<indexterm>
<primary><varname>port</varname> configuration parameter</primary>
</indexterm>
</term>
<listitem>
<para>
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.
</para>
</listitem>
</varlistentry>
<varlistentry id="guc-max-connections" xreflabel="max_connections">
<term><varname>max_connections</varname> (<type>integer</type>)
<indexterm>
<primary><varname>max_connections</varname> configuration parameter</primary>
</indexterm>
</term>
<listitem>
<para>
Determines the maximum number of concurrent connections to the
database server. The default is typically 100 connections, but
might be less if your kernel settings will not support it (as
determined during <application>initdb</application>). This parameter can
only be set at server start.
</para>
<para>
<productname>PostgreSQL</productname> sizes certain resources based directly on the value of
<varname>max_connections</varname>. Increasing its value leads to
higher allocation of those resources, including shared memory.
</para>
<para>
When running a standby server, you must set this parameter to the
same or higher value than on the primary server. Otherwise, queries
will not be allowed in the standby server.
</para>
</listitem>
</varlistentry>
<varlistentry id="guc-reserved-connections" xreflabel="reserved_connections">
<term><varname>reserved_connections</varname> (<type>integer</type>)
<indexterm>
<primary><varname>reserved_connections</varname> configuration parameter</primary>
</indexterm>
</term>
<listitem>
<para>
Determines the number of connection <quote>slots</quote> that are
reserved for connections by roles with privileges of the
<xref linkend="predefined-role-pg-use-reserved-connections"/>
role. Whenever the number of free connection slots is greater than
<xref linkend="guc-superuser-reserved-connections"/> but less than or
equal to the sum of <varname>superuser_reserved_connections</varname>
and <varname>reserved_connections</varname>,