You are not logged in.

#1 2009-09-29 12:49:57

cojack
Member
From: Poland
Registered: 2009-05-24
Posts: 25
Website

[SOLVED]Postgresql 8.4 connection problem...

Hello,
I have problem to connect to postgresql by cl (command line)

[localhost][~] $ psql -U cojack -p 5432 -h localhost -d test -W
Password for user cojack:
psql: could not connect to server: Połączenie odrzucone
        Is the server running on host "localhost" and accepting
        TCP/IP connections on port 5432?

And If I try to close postgresql:

[localhost][/home/cojack] # /etc/rc.d/postgresql stop
:: Stopping PostgreSQL                                                                                                                [BUSY]
pg_ctl: PID file "/var/lib/postgres/data/postmaster.pid" does not exist
Is server running?
                                                                                                                                      [FAIL]

I try to unhash the pg_hba.conf but nothing do... some one have the same problem? Or how to resolve this?

Last edited by cojack (2009-09-29 16:08:39)

Offline

#2 2009-09-29 14:47:23

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: [SOLVED]Postgresql 8.4 connection problem...

http://wiki.archlinux.org/index.php/Pos … Postgresql

Make sure that you followed the upgrade instructions and if necessary, downgrade to PostgreSQL 8.3.x first.

Last edited by thayer (2009-09-29 14:47:39)


thayer williams ~ thayerwilliams.ca

Offline

#3 2009-09-29 15:02:43

kishd
Member
Registered: 2006-06-14
Posts: 401

Re: [SOLVED]Postgresql 8.4 connection problem...

When I upgraded for some reason starting postgresql did not create the needed files. I had to run initdb to "initialise" postgresql before I could use pgsql to import the pg dump.


---for there is nothing either good or bad, but only thinking makes it so....
Hamlet, W Shakespeare

Offline

#4 2009-09-29 15:04:32

ahcaliskan
Member
From: Sweden
Registered: 2008-10-29
Posts: 174

Re: [SOLVED]Postgresql 8.4 connection problem...

same here, upgrade didn't work at all, had to initiate new database files

Offline

#5 2009-09-29 16:08:21

cojack
Member
From: Poland
Registered: 2009-05-24
Posts: 25
Website

Re: [SOLVED]Postgresql 8.4 connection problem...

Solution:

pacman -R postgresql

if You don't wanna have a backup or your before databases make this:

rm -rfv /var/lib/postgres/

else if You wanna have, find how to make a backup...

it will remove all your data from postgresql engine

next:

mkdir /var/lib/postgres/data
chown postgres /var/lib/postgres/data
pacman -S postgresql
su postgres
initdb -D /var/lib/postgres/data

It's all, at now We have to start everything again.

How?

su
passwd postgres
createuser -a -d -P -E -U postgres -W your_admin_user

and rest I think everybody know, how to create db and anything else.

Regards.

Last edited by cojack (2009-09-29 16:10:14)

Offline

Board footer

Powered by FluxBB