В /etc/postgresql/9.5/main/postgresql.conf
стоит настройка
#listen_addresses = '*'
но
farex@server:~$ sudo netstat -pant | grep postgres
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 1237/postgres
tcp6 0 0 ::1:5432 :::* LISTEN
sudo: unable to resolve host server
● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor prese
Active: active (exited) since Сб 2016-12-17 16:26:27 +07; 10min ago
Process: 1254 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 1254 (code=exited, status=0/SUCCESS)
Tasks: 0
Memory: 0B
CPU: 0
CGroup: /system.slice/postgresql.service
дек 17 16:26:27 server systemd[1]: Starting PostgreSQL RDBMS...
дек 17 16:26:27 server systemd[1]: Started PostgreSQL RDBMS.