I have the following problem, every time I turn on my machine, I go to the terminal and give sudo service postgresql status
, it always appears 9.3/main (port 5432): down
.
On other machines I have installed, it starts along with ubuntu, and when I run the same command appears 9.3/main (port 5432): online
, I did nothing different, but it seems that my machine is missing some configuration.
Every time I use the database for the first time, I need to start the service.
At the time of installation, the following message was displayed, I do not know if it has something to do with the error: No PostgreSQL clusters exist; see "man pg_createcluster"
I'm using Ubuntu 14.04 and Postgresql 9.3
postgresql.conf file :
# - Connection Settings -
#listen_addresses = 'localhost' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost'; use '*' for all
# (change requires restart)
port = 5432 # (change requires restart)
max_connections = 100 # (change requires restart)
# Note: Increasing max_connections costs ~400 bytes of shared memory per
# connection slot, plus lock space (see max_locks_per_transaction).
#superuser_reserved_connections = 3 # (change requires restart)
unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories
# (change requires restart)
#unix_socket_group = '' # (change requires restart)
#unix_socket_permissions = 0777 # begin with 0 to use octal notation
# (change requires restart)
#bonjour = off # advertise server via Bonjour
# (change requires restart)
#bonjour_name = '' # defaults to the computer name
# (change requires restart)
When installing Postgres the following information is displayed:
Removing obsolete dictionary files:
* No PostgreSQL clusters exist; see "man pg_createcluster"
Processing triggers for ureadahead (0.100.0-16) ...
Configurando postgresql-9.3 (9.3.4-1) ...
Creating new cluster 9.3/main ...
config /etc/postgresql/9.3/main
data /var/lib/postgresql/9.3/main
locale pt_BR.UTF-8
port 5432
update-alternatives: a usar /usr/share/postgresql/9.3/man/man1/postmaster.1.gz para disponibilizar /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) em modo automático
* Starting PostgreSQL 9.3 database server
Thank you.