Re: starting postgres/psql - Mailing list pgsql-novice

From Ron St-Pierre
Subject Re: starting postgres/psql
Date
Msg-id 40901B02.9010307@syscor.com
Whole thread Raw
In response to starting postgres/psql  (Robert Morgan <robert_@ihug.co.nz>)
List pgsql-novice
Robert Morgan wrote:

>Back again,I still cant access the dbms I have created the user postgres
>and started postgres.
>
>[root@localhost bob]# su postgres
>bash-2.05b$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l
>logfile start
>/usr/local/pgsql/bin/pg_ctl: line 341: logfile: Permission denied
>
Okay, you installed and initdb'd the database as user postgres, right?
Then one of these should fix it:

- Make sure that user postgres 'owns' the directory and its subdirectories:
  as user root:
       chown -R postgres.postgres /usr/local/pgsql
    (user postgres belongs to group postgres in this example)

- Make sure that /bin is in postgres' path (in .bash_profile)

  export PATH=$PATH:/usr/local/java/bin:/usr/local/ant/bin:/usr/local/pgsql/bin
                                                     ^   ^    ^   ^

(you may want/need/disregard the java and ant)

Then su to user postgres:
     su - postgres
and your psql -d template1 should work

Ron


pgsql-novice by date:

Previous
From: Robert Morgan
Date:
Subject: starting postgres/psql
Next
From: joseph speigle
Date:
Subject: Re: Server closed the connection unexpectedly