Это старая версия документа!
host all all 0.0.0.0/0 md5 host all all ::0/0 md5
listen_addresses = '*'
systemctl restart postgresql
apt install libpq-dev python3-dev gcc pip install psycopg2
sudo -u postgres psql ... \q
ALTER USER postgres PASSWORD 'myPassword';
postgres=# create database mydb; postgres=# create user myuser with encrypted password 'mypass'; postgres=# grant all privileges on database mydb to myuser;