[postgis-users] Postgis upgrade

Mateusz Naskręt -GEOPOZ- mateusz.naskret at geopoz.poznan.pl
Fri May 22 05:20:19 PDT 2009


Mark Cave-Ayland pisze:
> Ivan Mincik wrote:
>
>   
>> Also for me, it is more comfortable to do dump/restore upgrade. I have
>> also some experience with problematic "hard" upgrades.
>> Mark, which pg_dump/pg_restore options do You for dumping tables. Can
>> You explain little bit "You way" ?
>> How do You extract commands which create old version postgis fuctions ?
>> Do You extract tables with "-t" options, so the resulting SQL is
>> containing only  CREATE TABLE and INSERT commands?
>>
>> Ivan
>>     
>
> Sure. Depending upon the amount of data/dump format I normally either:
>
> 1) pg_dump -t individual tables/sequences into individual files
>
> or
>
> 2) Use pg_restore -L/-l options to remove all PostGIS functions from a
> compressed format dump catalogue, then restore the remaining data into a
> new database.
>
> On my new machine I then create a brand new PostGIS database and then
> simply restore any backup files into it. This guarantees that the SQL
> definitions and the PostGIS shared library are always in sync.
>
>
>   
Thanks for your answers!

So you think that best way is to make single dump for every 
table/sequence ? How to do that if i have lots of tables (about 500), 
views and sequences ? And how to dump user functions ?

I am not sure if my description in first email was clear enough. For 
every function from list (and only them):

	public.asgml(geometry, integer, integer)
	public.asukml(geometry, integer, integer)
        public.asukml(geometry, integer)
        public.asukml(geometry)
        public.st_pointn(geometry)


i have same error:  missing "$libdir/liblwgeom.so.1.2". So something 
like that:

   CREATE FUNCTION asgml(geometry, integer, integer) RETURNS text
      AS '$libdir/liblwgeom.so.1.2', 'LWGEOM_asGML'
      LANGUAGE c IMMUTABLE STRICT;
    ERROR:  could not access file "$libdir/liblwgeom.so.1.2": No suchfile or directory


I was looking to file lwpostgis.sql - and there are no such functions ! 
(asukml at all, asgm and st_pointn exist but with different arguments) .

Another question. Is there a way to check if my Postgis is ok after 
upgrade ?

 

Mateusz Naskręt





More information about the postgis-users mailing list