one)

drm@test:~$ sudo netstat -antup | grep 5432 tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 29926/postgres tcp6 0 0 :::5432 :::* LISTEN 29926/postgres 

but after adding your IP address to pg_hba and restarting the server

 # IPv4 local connections: host all all 127.0.0.1/32 md5 host all all 192.168.36.21 md5 

getting empty

 drm@test:~$ sudo systemctl restart postgresql drm@test:~$ sudo netstat -antup | grep 5432 drm@test:~$ 

those. the server is not listening and there is no possibility to connect from a remote computer

  • 2
    192.168.36.21 - the network mask is not specified here. try to add. - Pavel
  • Thank you very much, it is, earned! - user3720167 1:56 pm

1 answer 1

Ask your systemctl where and why he hid the message that the database did not start.

And the base did not start, because You have an error in hba, the IP address must be specified with the network mask.

However, restart for changing hba is not needed at all, just reload . Then the database will re-read configs, in case of syntax errors it will write about it to the log, but it will continue to work on the old version of settings. If there are no errors, it will start using the new config.