The service name is postgresql
and it accepts the usual commands for a background service:
start
stop
restart
status
$ sudo service postgresql restart
After installation, the contents of pg_hba.conf
default to the following.
# Database administrative login by Unix domain socket
local all postgres peer
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication postgres peer
#host replication postgres 127.0.0.1/32 md5
#host replication postgres ::1/128 md5
To enable authenticated users to log-in through Unix domain socket connections (e.g. connecting to the database with database middleware such as Django), change the second configuration to the following line.
# Enable authenticated users to log-in with MD5 passwords on Unix domain socket connections
local all all md5