Search Postgresql Archives

Re: 8.4 Data Not Compatible with 9.0.1 Upgrade?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 2. November 2010 22.37.33 Carlos Mennens wrote:
> On Tue, Nov 2, 2010 at 10:53 AM, Steve Clark <sclark@xxxxxxxxxxxxx> wrote:
> > mv /var/lib/postgres/data  /var/lib/postgres/data.old
> 
> Before I move or rename '/var/lib/postgres/data', what version of
> PostgreSQL should I be at? 8.4 or 9.0?

You should be at 9.0. The important thing is that you must start the new 
installation initdb with an empty  data directory, or you'll inevitably get 
the complaints about incompatibility with the old files. It's quite logical, 
really, if you think about it.

> > You will then have to do an initdb to create the basic 9.x databases.
> > You can then use psql or pg_restore depending on how you dumped
> > your data to restore your databases.
> 
> I simply ran the following command:
> 
> /usr/bin/pg_dump finance > finance.sql

That's only the first part of the upgrade process. Then you must prepare an 
empty directory to acommodate your data, do an initdb, and then populate the 
new directory from your dump file.
 
I think that the Gentoo method works great: In the /var/lib/postgres 
directory, we just create a new subirectory named /8.3, /8.4, /9.0, and so on, 
and then a new /data directory under each one. That way, you can safely remove 
the old data when you've confirmed that the new version actually works.

regards,
Leif B. Kristensen

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux