You are not logged in.

#1 2010-09-09 09:14:02

stevengoodman
Member
Registered: 2010-09-09
Posts: 3

Cant su - postgres

Hi Guys,

I've had a server setup working perfectly for the last 2 years. Today we installed a newer version of postgresql and recompiled apache/php.

Postgresql will not start now.

"service postgresql start" = /var/lib/pgsql/data is missing. Use "service postgresql initdb" to initialize the cluster first.

To initdb we need to be as user postgres.

"su - postgres" = "no file or directory"

In /etc/passwd = postgres:x:26:26:PostgreSQL Server:/var/lib/pgsql:/bin/bash

Any ideas as to how i can login as postgres user and enter these commands?

Offline

#2 2010-09-09 10:19:35

igndenok
Member
From: Sidoarjo, Indonesia
Registered: 2010-06-07
Posts: 160

Re: Cant su - postgres

Try running

# su - postgres

again, but run it as root.
I can use postgres user after running that as root, not as my user.


Ask, and it shall be given you.
Seek, and ye shall find.
Knock, and it shall be opened unto you.

Offline

#3 2010-09-09 10:20:28

stevengoodman
Member
Registered: 2010-09-09
Posts: 3

Re: Cant su - postgres

root@dedicated [/home]# su - postgres
: No such file or directory

Offline

#4 2010-09-09 16:08:35

marxav
Member
From: Gatineau, PQ, Canada
Registered: 2006-09-24
Posts: 386

Re: Cant su - postgres

Did you stop your postgres server first?  If you did not upgrade for two years, obvisouly this is an issue of "major release" upgrade.   That is internal structure of tables changed between releases and are not backward compatible basically.

Offline

#5 2010-09-10 04:18:47

stevengoodman
Member
Registered: 2010-09-09
Posts: 3

Re: Cant su - postgres

I dont need any of the databases. I just need postgresql running again. postgres was stopped prior to upgrading yes. It was uninstalled and then the new package installed.

Offline

#6 2010-09-10 06:18:37

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Cant su - postgres

"service postgresql start"... that command doesn't work on Arch. I think you should be talking to people who use the same distro as you.

Offline

Board footer

Powered by FluxBB