Thread: Automatic database upgrade
Hi,
I've got a question which I hope you'll forgive if I'm missing something obvious...
We (you, me, everyone) are currently presented with a problem when upgrading our installed version of PostgreSQL when upgrading to a major release version (i.e. 8.2 to 8.3, or 8.3 to 8.4) Is it not possible to have PostgreSQL "upgrade" the actual database cluster upon installing a new major version? I don't mean as a step during the actual upgrade. I'm suggesting that, if the database cluster has some sort of attribute which Postgres could read which would identify the latest version it was running against, then a tool (let's call it pg_upgrade) runs against that cluster to make it work against the newly installed version. I'm not sure if it would perform a dump then a restore, or whether it would actually change the data in the cluster (sounds dangerous).
I only ask this as it seems weird to have up dump everything, then restore it all again manually. I'm not sure other RBDMS require the user to perform these manual steps Postgres requires. Actually, it might go down as a pet peeve.
Is such a thing feasible? Or is there a better solution?
Maybe this is probably because I am not familiar enough with dumping and restoring clusters.
Cheers
Thom
I've got a question which I hope you'll forgive if I'm missing something obvious...
We (you, me, everyone) are currently presented with a problem when upgrading our installed version of PostgreSQL when upgrading to a major release version (i.e. 8.2 to 8.3, or 8.3 to 8.4) Is it not possible to have PostgreSQL "upgrade" the actual database cluster upon installing a new major version? I don't mean as a step during the actual upgrade. I'm suggesting that, if the database cluster has some sort of attribute which Postgres could read which would identify the latest version it was running against, then a tool (let's call it pg_upgrade) runs against that cluster to make it work against the newly installed version. I'm not sure if it would perform a dump then a restore, or whether it would actually change the data in the cluster (sounds dangerous).
I only ask this as it seems weird to have up dump everything, then restore it all again manually. I'm not sure other RBDMS require the user to perform these manual steps Postgres requires. Actually, it might go down as a pet peeve.
Is such a thing feasible? Or is there a better solution?
Maybe this is probably because I am not familiar enough with dumping and restoring clusters.
Cheers
Thom
> We (you, me, everyone) are currently presented with a problem when > upgrading > our installed version of PostgreSQL when upgrading to a major release > version (i.e. 8.2 to 8.3, or 8.3 to 8.4) Is it not possible to have > PostgreSQL "upgrade" the actual database cluster upon installing a new > major > version? I don't mean as a step during the actual upgrade. I'm > suggesting > that, if the database cluster has some sort of attribute which Postgres > could read which would identify the latest version it was running against, > then a tool (let's call it pg_upgrade) runs against that cluster to make > it > work against the newly installed version. Debian has an add-on named pg_upgradecluster which transforms an existing cluster into a new one transferring databases via dump/restore. This works nicely as long as the databases are not "too large" with respect to the hardware specs they are running on. Karsten -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01
Debian has an add-on named pg_upgradecluster which transforms an
existing cluster into a new one transferring databases via dump/restore.
This works nicely as long as the databases are not "too large" with
respect to the hardware specs they are running on.
Karsten
Right, I'm getting the hang of this mailing list etiquette now. :)
Ah really? Is that a Debian-only tool? If not, how would I get a copy on Gentoo?
Thom
> > Debian has an add-on named pg_upgradecluster which transforms an > > existing cluster into a new one transferring databases via dump/restore. > > > > This works nicely as long as the databases are not "too large" with > > respect to the hardware specs they are running on. > Ah really? Is that a Debian-only tool? Pretty much as it assumes packages are installed they way they are on Debian. > If not, how would I get a copy on Gentoo? You'd have to port it (or have it ported by making Gentoo maintainers talk to the Debian PostgreSQL package maintainer). Karsten -- Jetzt 1 Monat kostenlos! GMX FreeDSL - Telefonanschluss + DSL für nur 17,95 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a
2009/2/5 Karsten Hilbert <Karsten.Hilbert@gmx.net>
> > Debian has an add-on named pg_upgradecluster which transforms an
> > existing cluster into a new one transferring databases via dump/restore.
> >
> > This works nicely as long as the databases are not "too large" with
> > respect to the hardware specs they are running on.> Ah really? Is that a Debian-only tool?Pretty much as it assumes packages are installed they way they are
on Debian.You'd have to port it (or have it ported by making Gentoo maintainers
> If not, how would I get a copy on Gentoo?
talk to the Debian PostgreSQL package maintainer).
Karsten
That's a shame. When 8.4 comes out, I'll have to look carefully at the documentation for upgrading from 8.3.5.
Thanks
Thom