Thread: upgrade from 6.4 to 7.02 problem

upgrade from 6.4 to 7.02 problem

From
igor
Date:
Hi,

 I have problems with upgrade postgerSQL from 6.4 to 7.02

I have installed RH6.0 with default installation of pg 6.4,
First step - installation of rpm was successfull
 $ rpm -i --force postgrerpm7.02

Than I'm trying to install pg 7.02 and the second step
of it was failed :

 $ initdb -l /libdir - r /datadir
 ....
 ....
 Creating template database ...
 ERROR: pg_atoi: error in "uid": cann't parse "uid"
 initdb: couldn't create template database


 in data dir I found '/base' directory with file 'core'.

 That's all ... I need in suggestions.

Thanks.

Igor.



Re: upgrade from 6.4 to 7.02 problem

From
Thomas Swan
Date:
 $ rpm -i --force postgrerpm7.02

Not to sound rough, but if this is a new installation of RH6.0 you really wouldn't to be doing a --force option on the install.

Traditionally you would want to do

rpm -Uvh {the postgresql packages you want to install}

The data directory by default is /var/lib/pgsql.

Aside from that...

As root su to postgres
$ su - postgres
then run initdb

If initdb cannot find the database location it will ask you where the folders are.

If you change the default data directory you will need to inform postgres as to where the new location is by commandline or by editing the postmaster.opts file.

----------------
to connect to the db you can connect by doing
psql template1 postgres

where template1 is the first database created by initdb. and postgres is the user you are connecting as.

By default you cannot connect as root.

I hope this helps

Thomas

-
- Thomas Swan                                   
- Graduate Student  - Computer Science
- The University of Mississippi
-
- "People can be categorized into two fundamental
- groups, those that divide people into two groups
- and those that don't."