When trying to start PostgreSQL, I get this 'empty' error message:
root@mountain-lion:/home/ubuntu# service postgresql start
* Starting PostgreSQL 9.1 database server
* Error: could not exec /usr/lib/postgresql/9.1/bin/pg_ctl /usr/lib/postgresql/9.1/bin/pg_ctl start -D /vol/postgres -l /var/log/postgresql/postgresql-9.1-main.log -s -o -c config_file="/etc/postgresql/9.1/main/postgresql.conf" :
This is a freshly installed Ubuntu 11.10 server (on EC2 / Scalarium), with postgresql-9.1
just installed via apt-get
.
There's one change configuration value in postgresql.conf:
data_directory = '/vol/postgres'
/vol/postgres
looks like this
drwx------ 5 postgres postgres 38 2012-05-18 15:13 base
drwx------ 2 postgres postgres 4096 2012-05-18 15:13 global
drwx------ 2 postgres postgres 17 2012-05-18 15:12 pg_clog
drwx------ 4 postgres postgres 34 2012-05-18 15:12 pg_multixact
drwx------ 2 postgres postgres 17 2012-05-18 15:13 pg_notify
drwx------ 2 postgres postgres 6 2012-05-18 15:12 pg_serial
drwx------ 2 postgres postgres 24 2012-05-18 15:13 pg_stat_tmp
drwx------ 2 postgres postgres 17 2012-05-18 15:12 pg_subtrans
drwx------ 2 postgres postgres 6 2012-05-18 15:12 pg_tblspc
drwx------ 2 postgres postgres 6 2012-05-18 15:12 pg_twophase
-rw------- 1 postgres postgres 4 2012-05-18 15:12 PG_VERSION
drwx------ 3 postgres postgres 58 2012-05-18 15:12 pg_xlog
-rw------- 1 postgres postgres 133 2012-05-18 15:13 postmaster.opts
lrwxrwxrwx 1 root root 36 2012-05-18 15:13 server.crt -> /etc/ssl/certs/ssl-cert-snakeoil.pem
lrwxrwxrwx 1 root root 38 2012-05-18 15:13 server.key -> /etc/ssl/private/ssl-cert-snakeoil.key
Any idea?
Update: When I set data_directory
to the default (/var/lib/postgresql/9.1/main
) it works fine, so there must be something wrong in that specific change.
Fixed. First I changed the owner of
/vol/postgres
topostgres
(after comments on the question). This resulted in the following understandable error:So I did what it says and now it starts.