[postgis-users] Problems reloading data during hard upgrade

Toomas Aas toomas.aas at raad.tartu.ee
Fri Jan 4 01:44:18 PST 2008


Hello Mark!

> Generally for such a version change, I would recommend the following as
> the "cleanest" way to upgrade:
> 
> - Create a new PostgreSQL 8.2.5 installation
> - Install the latest PostGIS, and create a new spatial database
> - Dump the tables/sequences from your PostgreSQL 8.1.5 installation
> using pg_dump, and restore to your PostgreSQL 8.2.5 installation
>   - If there are a lot of tables, pg_dump the entire database and then
>     use pg_restore -L/-l options to restore only the tables/sequences
>     in your database rather than any other internal objects
>   - If there are a few objects, you may find it easier to use
>     pg_dump -t for the individual tables/sequences
> 
> Also: you really want to install the latest 1.3.2 release rather than
> 1.3.1 - this version has several known bugs which are likely to cause
> problems for you.

Thanks very much for your advice. As I still have the dumps made from old 
version before upgrade, I could probably just drop the databases and 
re-create them, but this would mean losing couple of hours worth of 
'production' data. I use the word production in quotes, since there is 
actually not much production going on, so losing this data is no big deal. 
However, I wonder whether I could also dump the databases from *new* 
version, then re-create them and restore tables using pg_restore -L. It 
seems to me that this should achieve the same goal?

-- 
Toomas Aas



More information about the postgis-users mailing list