Friday, May 18, 2012

Starting PostgreSQL 9 after upgrading to OpenSuSE 12.1

A day or two ago, I decided it was time to try OpenSuSE 12.1.  i couldn't get PostgreSQL to start, so I uninstalled it using YaST, then re-installed using zypper install postgresql-server. 

If you're still getting the message:  "Job failed. See system logs and 'systemctl status' for details.", try this quick fix [i assume you know the following;  otherwise proceed at your own risk / peril]:

su - postgres

sudo rm -fR /var/lib/pgsql/data

initdb -D /var/lib/pgsql/data

postgres -D /var/lib/pgsql/data

       or

pg_ctl -D /var/lib/pgsql/data -l logfile start

psql


2 comments:

Tuga said...

Awesome, thanks mate!

guettli said...

This deletes all databases and tables. Not a solution for me.