Re: Upgrading from 7.1.3 to 7.2.3 - Mailing list pgsql-general

From Justin Clift
Subject Re: Upgrading from 7.1.3 to 7.2.3
Date
Msg-id 3DCEB72B.5A61D753@postgresql.org
Whole thread Raw
In response to Upgrading from 7.1.3 to 7.2.3  ("Aurangzeb M. Agha" <aagha@bigfoot.com>)
Responses Re: Upgrading from 7.1.3 to 7.2.3  ("Aurangzeb M. Agha" <aagha@bigfoot.com>)
List pgsql-general
Hi Aurangzeb,

First and *most important question*... have you backed up your data?  Do
so *first*.  :)

From everything you've said here, the safest approach will probably be
to extract all of your data with the 'pg_dumpall' command, get 7.2.3
installed, then reload your data.

If this sounds alright to you, then try this:

1) Make sure that your old version of PostgreSQL is running

2) Extract/dump your data to a file

$ pg_dumpall > somefile

3) Uninstall your old version of PostgreSQL (version 7.1.3 in your case)

4) Delete the old database storage files, you don't need them any more

5) Install the new version of PostgreSQL (version 7.2.3 in this case)

6) Initialise a new database storage area:

$ PGDATA=/some/empty/directory/location
$ export PGDATA
$ initdb

7) Start the new version of PostgreSQL to check it works.  It should
startup fine.

8) Load your data base into the database

$ psql template1 < somefile

If that all worked, you should now configure PostgreSQL 7.2.3's memory
usage (the defaults are extremely sad for most cases).

9) Shut down PostgreSQL

10) Edit the postgresql.conf file in the database storage area.  Bruce
Momjian's guide gives a good overview of the parameters needed to
change:

http://www.ca.postgresql.org/docs/momjian/hw_performance/

11) Start PostgreSQL again.

From here on, all should be fine.

Well, this is the overview of the process, but hopefully it gives you'll
be able to figure out the exact commands needed for each one, etc.

And just to re-inforce the point... please backup your data before doing
this.

:-)

Regards and best wishes,

Justin Clift


"Aurangzeb M. Agha" wrote:
>
> I'm having a horrible time trying to upgrade from 7.1.3 on our Linux RH
> 7.2 box to the latest version.
>
> I first tried "up2date", which failed as it didn't even know there was ANY
> update available for Postgres.
>
> I then downloaded the new TAR for 7.2.3 and walked through the upgrade
> steps in pg_upgrade.1, only to be brought to a screaching halt in step 2
> of the upgrade:
>
>         $ pg_upgrade -2
>         pg_upgrade is for PostgreSQL version 7.2
>         but /usr/local/G101/CMS/App/DB/PG_VERSION contains 7.1.
>         Did you run initdb for version 7.1 by mistake?
>
> When I found the NEW PgSQL bin, I re-ran initdb.  However, running
> 'pg_upgrade -2' gave me:
>
>         Unable to find pg_resetxlog in your path.
>         Install it from pgsql/contrib/pg_resetxlog and continue.  Exiting.
>
> I put pgsql/contrib/pg_resetxlog in the new PgSQL bin
> (/usr/local/pgsql/bin) but when I try to run pg_upgrade -2, I get:
>
>         Locales do not match between the two versions.  Exiting.
>
> What does that mean?  What do I do to get around it?
>
> The (old) RPM's I have on my system are:
>
>         $ rpm -qa | grep -i postgres
>         postgresql-contrib-7.1.3-2
>         postgresql-tk-7.1.3-2
>         postgresql-libs-7.1.3-2
>         postgresql-server-7.1.3-2
>         postgresql-docs-7.1.3-2
>         postgresql-tcl-7.1.3-2
>         postgresql-7.1.3-2
>         postgresql-jdbc-7.1.3-2
>
> I'm ready to do the upgrade anyway possible, using pg_upgrade, not using
> it, whatever.
>
> If I do a new install, do I need to remove all the RPM installation I
> already have on my machine?  What about everything that got installed
> during the upgrade process?
>
> Any help would be appreciated.
>
>         Thanks in Advance,
>         Aurangzeb
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
   - Indira Gandhi

pgsql-general by date:

Previous
From: Neil Conway
Date:
Subject: Re: Upgrading from 7.1.3 to 7.2.3
Next
From: Frank Miles
Date:
Subject: Re: C++: get value for integral types?