Thread: I have a problem with postmaster ( Newbie question)

I have a problem with postmaster ( Newbie question)

From
"MUMCU, Burak"
Date:

Hi,

I'm using Postgres on Suse Linux 7.0 . After I reboot the server, I use the
command psql database I have connectdb failed problem and
after that I write pg_ctl start I have postmaster running question. How can
I solve this problem?

Thanks

Re: I have a problem with postmaster ( Newbie question)

From
john mcmanus
Date:
MUMCU, Burak wrote:

>
>
> Hi,
>
> I'm using Postgres on Suse Linux 7.0 . After I reboot the server, I use
> the command psql database I have connectdb failed problem and
> after that I write pg_ctl start I have postmaster running question. How
> can I solve this problem?
>
> Thanks

Ive been having exactly the same problem with SuSE 7.0.

The solution I found is this:

open /sbin/init.d/postgres in an editor.


Make sure that DATADIR=/var/lib/pgsql/data.

(You should be able to set this to anything but I think theres a bug in
YAST that prevents you from having a different data directory)


Then:

su postgres

initdb --pgdata /var/lib/pgsql/data

su root
rcpostgres start        (If this fails at this point then then maybe do this at
                the end)

su postgres
create user  loginname
createdb      database


you should now be able to:

pgsql

to connect up and you should find that postmaster is running automatically
next time you boot up.
Hope this works!!

John