Thread: Best practice for 8.1.5 -> 8.2 migration - with big database?

Best practice for 8.1.5 -> 8.2 migration - with big database?

From
"Mason Hale"
Date:
From what I've read about postgres 8.2, upgrading from any previous
version requires a full database dump and restore.

I am working with largish database (~70GB) that I would like to upgrade to 8.2.
A full database dump currently takes ~3 hrs, I expect a restore
require a similar timeframe if not more.

So, I'm fishing to see of there are alternatives to taking our
production database down for 6+ hours do this upgrade. Can slony or
wal files be of help here?

I realize I can do a pg_dump with the database online, but that dump
will not include data added after the data dump for each table starts,
correct? Is there way to get just the data after a certain point in
time (say after the pg_dump started)?

Also -- due to hardware limitations, we need to install 8.2.x on the
same hardware 8.1.5 is currently running on. Can those two versions
exist side-by-side? If something goes wrong, I want to be able to
rollback to 8.1.5.

thanks in advance,
Mason

Re: Best practice for 8.1.5 -> 8.2 migration - with big database?

From
Erik Jones
Date:
Mason Hale wrote:
>> From what I've read about postgres 8.2, upgrading from any previous
> version requires a full database dump and restore.
>
> I am working with largish database (~70GB) that I would like to
> upgrade to 8.2.
> A full database dump currently takes ~3 hrs, I expect a restore
> require a similar timeframe if not more.
>
> So, I'm fishing to see of there are alternatives to taking our
> production database down for 6+ hours do this upgrade.
Check out  <a
href="http://pgfoundry.org/projects/pg-migrator/">pg_migrator</a>.

Re: Best practice for 8.1.5 -> 8.2 migration - with big database?

From
Peter Eisentraut
Date:
Mason Hale wrote:
> So, I'm fishing to see of there are alternatives to taking our
> production database down for 6+ hours do this upgrade. Can slony or
> wal files be of help here?

Slony can, but WAL files will not work between different versions.

> Also -- due to hardware limitations, we need to install 8.2.x on the
> same hardware 8.1.5 is currently running on. Can those two versions
> exist side-by-side?

Sure.  Just set a different port and different data directory.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/