[postgis-users] Postgis upgrade instrucitons

Paul Ramsey pramsey at refractions.net
Wed Oct 13 09:46:18 PDT 2004


You can upgrade the underlying library without dumping the data, it just 
takes a certain amount of care, so we do not recommend it. Our 
documented way is guaranteed to work 100% of the time.

Simply overwrite your old GEOS and postgis .so installations with new 
ones. If the version and file information has changed, update the 
pg_proc table so that the correct binary .so is referenced. If you do 
not want any of the new functions you do not have to try do undef/redef 
the functions. We try to keep the function signatures the same across 
versions so you can do this. Use at your own risk.

This trick will *not* work when we go to 1.0, which will have the LWGEOM 
format as the on disk representation, so a dump/restore *will* be 
required. However, the on disk format has not changed for a number of 
releases now, so this has been a doable procedure since 0.7 through 0.9.

Paul

Ethan Alpert wrote:

> Well in this case the medicine is worse than the illness. I'm going to
> have to schedule downtime, send notices to users, and all that BS so I
> guess I'll have to figure a way to filter these geometries that cause
> the problems. The .sql text file for this database is going to be about
> 30 GB. I'm betting it takes several hours just to dump. I'm going to
> have to wait for a long weekend and the cloesest one is Thanksgiving :(
> 
> -e
> 
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
> strk at refractions.net
> Sent: Tuesday, October 12, 2004 1:38 PM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] Postgis upgrade instrucitons
> 
> 
> On Tue, Oct 12, 2004 at 01:30:07PM -0600, Ethan Alpert wrote:
> 
>>
>>
>>Ack!! Are you kidding me? I have a 100 million tuple DB I've built It 
>>took 20+hours to ingest. Is this really the ONLY way??
> 
> 
> :)
> Not *really*.
> In postgis-0.9.x there is a postgis_restore.pl script
> which should make life easier.
> - pg_dump -Fc olddb
> - postgis_restore.pl
> .. read synopsis ..
> --strk;
> 
> PS: let me know how it went.
> 
> 
>>UPGRADING:
>>
>>Upgrading PostGIS can be tricky, because the underlying C libraries 
>>which support the object types and geometries may have changed between
>>versions.
>>To avoid problems when upgrading, you will have to dump all the tables
>>in your database, destroy the database, create a new one, add the
>>PL/pgSQL
>>language, upload the new postgis.sql file, then upload your database
>>dump:
>>
>>  pg_dump -t "*" -f dumpfile.sql yourdatabase
>>  dropdb yourdatabase
>>  createdb yourdatabase
>>  createlang plpgsql yourdatabase
>>  psql -f postgis.sql -d yourdatabase
>>  psql -f dumpfile.sql -d yourdatabase
>>  vacuumdb -z yourdatabase 
>>_______________________________________________
>>postgis-users mailing list postgis-users at postgis.refractions.net
>>http://postgis.refractions.net/mailman/listinfo/postgis-users
> 
> _______________________________________________
> postgis-users mailing list postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list