per the documentation to listen for client connections on a given IP address you set listen_addresses to a commaspearated list of IP addresses in postgresql.conf
That line is commented out in the default conf file, when I uncomment it, and add the address, then do sudo systemctl restart postgresql the postgres processes are not running afterwards.
root@dhbpostgres:/home/johnson# ps -aux | grep postgres
root 1452 0.0 0.0 6608 2364 pts/1 S+ 19:07 0:00 grep --color=auto
postgres
root@dhbpostgres:/home/johnson# vi /etc/postgresql/15/main/postgresql.conf <<commented out listen_addresses
root@dhbpostgres:/home/johnson# systemctl restart postgresql
root@dhbpostgres:/home/johnson# ps -aux | grep postgres
postgres 1461 0.2 0.1 219220 30568 ? Ss 19:08 0:00 /usr/lib/postgresql/15/bin/postgres -D /opt/data/pgdata -c config_file=/etc/postgresql/15/main/postgresql.conf
postgres 1462 0.0 0.0 219352 7028 ? Ss 19:08 0:00
postgres: 15/main: checkpointer
postgres 1463 0.0 0.0 219220 7024 ? Ss 19:08 0:00
postgres: 15/main: background writer
postgres 1465 0.0 0.0 219220 7032 ? Ss 19:08 0:00
postgres: 15/main: walwriter
postgres 1466 0.0 0.0 220816 9508 ? Ss 19:08 0:00
postgres: 15/main: autovacuum launcher
postgres 1467 0.0 0.0 220792 9444 ? Ss 19:08 0:00
postgres: 15/main: logical replication launcher
root 1480 0.0 0.0 6608 2276 pts/1 S+ 19:08 0:00 grep --color=auto
postgres
If I comment that line out as it was in the beginning, and restart, it runs.
the syslog gives me the error
Sep 6 19:06:01 dhbpostgres
postgresql@15-main[1538]: 2023-09-06 19:06:01.181 GMT [1543] LOG: syntax error in file "/etc/postgresql/15/main/postgresql.conf" line 63, near token ".206"
which corresponds to the listen_addresses line in the config file and is part of the address…
#listen_addresses = 10.128.206.109
# what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost'; use '*' for all
# (change requires restart)
What am I missing? (postgresql 15.4 running on Ubuntu 22.04), installed via postgresql.org apt repo.
--
Bruce Johnson University of Arizona College of Pharmacy Information Technology Group Institutions do not have opinions, merely customs |