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 02 November 2010 7:02:05 am Carlos Mennens wrote:
> So I am still in the dark about the entire upgrade or step up process
> from 8.4.4-6 to 9.0.1-2. I have my 4 databases all backed up which I
> did when my server was 8.4.4-6 using the 'pg_dump' utility. That
> worked fine. So after I backed up my databases, I then upgraded the
> daemon to 9.0.1-2 and from there I don't understand the process. I
> obviously can't connect to the PostgreSQL database after I upgrade
> because I get the error:
>
> FATAL:  database files are incompatible with server
> DETAIL:  The data directory was initialized by PostgreSQL version 8.4,
> which is not compatible with this version 9.0.1.
>
> I have located the '/usr/bin/pg_upgrade' but I don't understand how I
> go about this. I am worried because I have 12 unique database users
> with unique / individual grants on specific databases. I don't want to
> start from scratch so I would assume this is where the 'pg_upgrade'
> script comes into play. How do I proceed from this point on? Obviously
> I can't access or connect to PostgreSQL once I upgrade to 9.0.1-2 so I
> assume at this time I need to execute the 'pg_upgrade' script to move
> forward, right?

pg_upgrade uses a different process then pg_dump/pg_restore.In order to use it 
you have to have both the old cluster and new cluster directories available at 
the same time, though not both servers running at the same time. See here for 
details:
http://www.postgresql.org/docs/9.0/interactive/pgupgrade.html


Since you already did the pg_dump, you also have the option of using 
psql/pg_restore to populate the 9.0 cluster. The choice of restore software 
depends on whether you used the plain text option to pg_dump(restore with psql) 
or the custom option(restore with pg_restore). Database users are global to 
cluster, in order to carry them over you need to do pg_dumpall -g where the -g 
specifies dump global objects only. If you have not already done that, it will 
be necessary to start up the 8.4 server again.

-- 
Adrian Klaver
adrian.klaver@xxxxxxxxx

-- 
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