documentation issue: listen_addresses does NOT take a comma-separated list of host names

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: hirnstrom(at)arcor(dot)de
Subject: documentation issue: listen_addresses does NOT take a comma-separated list of host names
Date: 2024-03-03 19:24:20
Message-ID: 170949386083.644.3898742260684710908@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/runtime-config-connection.html
Description:

In the documentation, I read:
<quote>
20.3.1. Connection Settings

listen_addresses (string)

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
comma-separated list of host names and/or numeric IP addresses. (...)
</quote>
I tried different versions of names and IPs, quoted in single, double and no
quotes at all, comma separated between quotes and inside, like
<quote>
listen_addresses = '192.168.32.3','127.0.0.1'
# or
listen_addresses = '192.168.32.3,127.0.0.1'
</quote>
but `sudo journalctl -eb -u postgresql(at)14-main(dot)service -o cat`
gives me:
<quote>
Reloading PostgreSQL Cluster 14-main...
Error: invalid line 61 in /etc/postgresql/14/main/postgresql.conf:
listen_addresses = "192.168.32.3","127.0.0.1"
postgresql(at)14-main(dot)service: Control process exited, code=exited,
status=1/FAILURE
Reload failed for PostgreSQL Cluster 14-main.
Reloading PostgreSQL Cluster 14-main...
Error: invalid line 61 in /etc/postgresql/14/main/postgresql.conf:
listen_addresses = "192.168.32.3,127.0.0.1"
postgresql(at)14-main(dot)service: Control process exited, code=exited,
status=1/FAILURE
Reload failed for PostgreSQL Cluster 14-main.
Reloading PostgreSQL Cluster 14-main...
Error: invalid line 61 in /etc/postgresql/14/main/postgresql.conf:
listen_addresses = '192.168.32.3','127.0.0.1'
postgresql(at)14-main(dot)service: Control process exited, code=exited,
status=1/FAILURE
Reload failed for PostgreSQL Cluster 14-main.
</quote>

So I tried to follow the otherwise seen pattern and wrote into
postgresql.conf:
<quote>
listen_addresses = '192.168.32.3'
listen_addresses = '127.0.0.1'
</quote>
which worked.

Note, that in the file itself, the comment repeats the (imho)
misinformation.

<quote>
#listen_addresses = 'localhost' # what IP address(es) to listen on;
# comma-separated list of addresses;
</quote>

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Shinya Kato 2024-03-04 05:27:41 Fix analyze_sampling docs in postgres-fdw.sgml
Previous Message PG Doc comments form 2024-02-28 15:28:53 Ubuntu and Debian Download/Installation instructions enhancement