[postgis-devel] Fwd: PostGIS 1.4

Paul Ramsey pramsey at opengeo.org
Wed Jul 8 16:00:57 PDT 2009


Some issues on the soft upgrade, where the client soft upgrades an  
8.3/1.3 database to 8.3/1.4, then dumps and restores into 8.4 to  
create an 8.4/1.4 database (seems like the most likely upgrade path,  
and the one we should recommend).

These are aesthetic, the actual restore is good. I was thinking that  
since our PgSQL requirement is 8.2, we could add DROP IF EXISTS  
statements to the top of postgis.sql for the removed functions and  
then postgis_upgrade.sql would inherit them, and everything would work  
hunky dory.

Thoughts?

P

PS - please think about, and try some, upgrades. We need to include a  
good upgrade document with this release, and Bruce's first attempt  
failed becuase he tried to simultaneously upgrade pgsql and postgis.  
We need to be clear about the procedure.

Begin forwarded message:

> From: "Bruce Rindahl" <Bruce.Rindahl at ventura.org>
> Date: July 8, 2009 3:49:09 PM PDT (CA)
> To: "Paul Ramsey" <pramsey at opengeo.org>
> Subject: Re: PostGIS 1.4
>
> Thanks
> Soft upgrade worked much better.  The directions for a hard upgrade  
> looked like *nix only.
> FYI the following are the errors during the soft restore:
>
> pg_restore: [archiver (db)] Error while PROCESSING TOC:
> pg_restore: [archiver (db)] Error from TOC entry 20; 1255 67668  
> FUNCTION histogram2d_in(cstring) postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  could  
> not access file "$libdir/liblwgeom.dll": No such file or directory
>     Command was: CREATE FUNCTION histogram2d_in(cstring) RETURNS  
> histogram2d
>     AS '$libdir/liblwgeom.dll', 'lwhistogram2d_in'
>     LANGUAGE ...
> pg_restore: [archiver (db)] could not execute query: ERROR:   
> function public.histogram2d_in(cstring) does not exist
>     Command was: ALTER FUNCTION public.histogram2d_in(cstring) OWNER  
> TO postgres;
> pg_restore: creating FUNCTION histogram2d_out(histogram2d)
> pg_restore: [archiver (db)] Error from TOC entry 21; 1255 67669  
> FUNCTION histogram2d_out(histogram2d) postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  could  
> not access file "$libdir/liblwgeom.dll": No such file or directory
>     Command was: CREATE FUNCTION histogram2d_out(histogram2d)  
> RETURNS cstring
>     AS '$libdir/liblwgeom.dll', 'lwhistogram2d_out'
>     LANGUAG...
> pg_restore: [archiver (db)] could not execute query: ERROR:   
> function public.histogram2d_out(histogram2d) does not exist
>     Command was: ALTER FUNCTION public.histogram2d_out(histogram2d)  
> OWNER TO postgres;
> pg_restore: creating TYPE histogram2d
> pg_restore: [archiver (db)] Error from TOC entry 1039; 1247 67667  
> TYPE histogram2d postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:   
> function histogram2d_in(cstring) does not exist
>     Command was: CREATE TYPE histogram2d (
>     INTERNALLENGTH = variable,
>     INPUT = histogram2d_in,
>     OUTPUT = histogram2d_out,
>     ALIGN...
> pg_restore: creating FUNCTION asgml(geometry, integer, integer)
> pg_restore: [archiver (db)] Error from TOC entry 22; 1255 67754  
> FUNCTION asgml(geometry, integer, integer) postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  could  
> not access file "$libdir/liblwgeom.dll": No such file or directory
>     Command was: CREATE FUNCTION asgml(geometry, integer, integer)  
> RETURNS text
>     AS '$libdir/liblwgeom.dll', 'LWGEOM_asGML'
>     LANGUAGE c...
> pg_restore: [archiver (db)] could not execute query: ERROR:   
> function public.asgml(geometry, integer, integer) does not exist
>     Command was: ALTER FUNCTION public.asgml(geometry, integer,  
> integer) OWNER TO postgres;
> pg_restore: creating FUNCTION asukml(geometry, integer, integer)
> pg_restore: [archiver (db)] Error from TOC entry 24; 1255 67766  
> FUNCTION asukml(geometry, integer, integer) postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  could  
> not access file "$libdir/liblwgeom.dll": No such file or directory
>     Command was: CREATE FUNCTION asukml(geometry, integer, integer)  
> RETURNS text
>     AS '$libdir/liblwgeom.dll', 'LWGEOM_asKML'
>     LANGUAGE ...
> pg_restore: [archiver (db)] could not execute query: ERROR:   
> function public.asukml(geometry, integer, integer) does not exist
>     Command was: ALTER FUNCTION public.asukml(geometry, integer,  
> integer) OWNER TO postgres;
> pg_restore: creating FUNCTION asukml(geometry, integer)
> pg_restore: [archiver (db)] Error from TOC entry 25; 1255 67767  
> FUNCTION asukml(geometry, integer) postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  could  
> not access file "$libdir/liblwgeom.dll": No such file or directory
>     Command was: CREATE FUNCTION asukml(geometry, integer) RETURNS  
> text
>     AS '$libdir/liblwgeom.dll', 'LWGEOM_asKML'
>     LANGUAGE c IMMUTAB...
> pg_restore: [archiver (db)] could not execute query: ERROR:   
> function public.asukml(geometry, integer) does not exist
>     Command was: ALTER FUNCTION public.asukml(geometry, integer)  
> OWNER TO postgres;
> pg_restore: creating FUNCTION asukml(geometry)
> pg_restore: [archiver (db)] Error from TOC entry 26; 1255 67768  
> FUNCTION asukml(geometry) postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  could  
> not access file "$libdir/liblwgeom.dll": No such file or directory
>     Command was: CREATE FUNCTION asukml(geometry) RETURNS text
>     AS '$libdir/liblwgeom.dll', 'LWGEOM_asKML'
>     LANGUAGE c IMMUTABLE STRICT;
> pg_restore: [archiver (db)] could not execute query: ERROR:   
> function public.asukml(geometry) does not exist
>     Command was: ALTER FUNCTION public.asukml(geometry) OWNER TO  
> postgres;
> pg_restore: creating FUNCTION build_histogram2d(histogram2d, text,  
> text)
> pg_restore: [archiver (db)] Error from TOC entry 27; 1255 67791  
> FUNCTION build_histogram2d(histogram2d, text, text) postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  could  
> not access file "$libdir/liblwgeom.dll": No such file or directory
>     Command was: CREATE FUNCTION build_histogram2d(histogram2d,  
> text, text) RETURNS histogram2d
>     AS '$libdir/liblwgeom.dll', 'build_lwhist...
> pg_restore: [archiver (db)] could not execute query: ERROR:   
> function public.build_histogram2d(histogram2d, text, text) does not  
> exist
>     Command was: ALTER FUNCTION  
> public.build_histogram2d(histogram2d, text, text) OWNER TO postgres;
> pg_restore: creating FUNCTION build_histogram2d(histogram2d, text,  
> text, text)
> pg_restore: [archiver (db)] Error from TOC entry 28; 1255 67792  
> FUNCTION build_histogram2d(histogram2d, text, text, text) postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  PL/ 
> pgSQL functions cannot return type histogram2d
>     Command was: CREATE FUNCTION build_histogram2d(histogram2d,  
> text, text, text) RETURNS histogram2d
>     AS $_$
> BEGIN
>  EXECUTE 'SET local se...
> pg_restore: [archiver (db)] could not execute query: ERROR:   
> function public.build_histogram2d(histogram2d, text, text, text)  
> does not exist
>     Command was: ALTER FUNCTION  
> public.build_histogram2d(histogram2d, text, text, text) OWNER TO  
> postgres;
> pg_restore: creating FUNCTION create_histogram2d(box2d, integer)
> pg_restore: [archiver (db)] Error from TOC entry 30; 1255 67808  
> FUNCTION create_histogram2d(box2d, integer) postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  could  
> not access file "$libdir/liblwgeom.dll": No such file or directory
>     Command was: CREATE FUNCTION create_histogram2d(box2d, integer)  
> RETURNS histogram2d
>     AS '$libdir/liblwgeom.dll', 'create_lwhistogram2d...
> pg_restore: [archiver (db)] could not execute query: ERROR:   
> function public.create_histogram2d(box2d, integer) does not exist
>     Command was: ALTER FUNCTION public.create_histogram2d(box2d,  
> integer) OWNER TO postgres;
> pg_restore: creating FUNCTION dump(geometry)
> pg_restore: [archiver (db)] Error from TOC entry 32; 1255 67825  
> FUNCTION dump(geometry) postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  could  
> not access file "$libdir/liblwgeom.dll": No such file or directory
>     Command was: CREATE FUNCTION dump(geometry) RETURNS SETOF  
> geometry_dump
>     AS '$libdir/liblwgeom.dll', 'LWGEOM_dump'
>     LANGUAGE c IMMU...
> pg_restore: [archiver (db)] could not execute query: ERROR:   
> function public.dump(geometry) does not exist
>     Command was: ALTER FUNCTION public.dump(geometry) OWNER TO  
> postgres;
> pg_restore: creating FUNCTION estimate_histogram2d(histogram2d, box2d)
> pg_restore: [archiver (db)] Error from TOC entry 35; 1255 67833  
> FUNCTION estimate_histogram2d(histogram2d, box2d) postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  could  
> not access file "$libdir/liblwgeom.dll": No such file or directory
>     Command was: CREATE FUNCTION estimate_histogram2d(histogram2d,  
> box2d) RETURNS double precision
>     AS '$libdir/liblwgeom.dll', 'estimate_...
> pg_restore: [archiver (db)] could not execute query: ERROR:   
> function public.estimate_histogram2d(histogram2d, box2d) does not  
> exist
>     Command was: ALTER FUNCTION  
> public.estimate_histogram2d(histogram2d, box2d) OWNER TO postgres;
> pg_restore: creating FUNCTION explode_histogram2d(histogram2d, text)
> pg_restore: [archiver (db)] Error from TOC entry 36; 1255 67839  
> FUNCTION explode_histogram2d(histogram2d, text) postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  could  
> not access file "$libdir/liblwgeom.dll": No such file or directory
>     Command was: CREATE FUNCTION explode_histogram2d(histogram2d,  
> text) RETURNS histogram2d
>     AS '$libdir/liblwgeom.dll', 'explode_lwhistog...
> pg_restore: [archiver (db)] could not execute query: ERROR:   
> function public.explode_histogram2d(histogram2d, text) does not exist
>     Command was: ALTER FUNCTION  
> public.explode_histogram2d(histogram2d, text) OWNER TO postgres;
> pg_restore: creating FUNCTION jtsnoop(geometry)
> pg_restore: [archiver (db)] Error from TOC entry 38; 1255 67906  
> FUNCTION jtsnoop(geometry) postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  could  
> not access file "$libdir/liblwgeom.dll": No such file or directory
>     Command was: CREATE FUNCTION jtsnoop(geometry) RETURNS geometry
>     AS '$libdir/liblwgeom.dll', 'JTSnoop'
>     LANGUAGE c STRICT;
> pg_restore: [archiver (db)] could not execute query: ERROR:   
> function public.jtsnoop(geometry) does not exist
>     Command was: ALTER FUNCTION public.jtsnoop(geometry) OWNER TO  
> postgres;
> pg_restore: creating FUNCTION postgis_jts_version()
> pg_restore: [archiver (db)] Error from TOC entry 39; 1255 68009  
> FUNCTION postgis_jts_version() postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  could  
> not access file "$libdir/liblwgeom.dll": No such file or directory
>     Command was: CREATE FUNCTION postgis_jts_version() RETURNS text
>     AS '$libdir/liblwgeom.dll', 'postgis_jts_version'
>     LANGUAGE c IMMU...
> pg_restore: [archiver (db)] could not execute query: ERROR:   
> function public.postgis_jts_version() does not exist
>     Command was: ALTER FUNCTION public.postgis_jts_version() OWNER  
> TO postgres;
> pg_restore: creating FUNCTION st_build_histogram2d(histogram2d,  
> text, text, text)
> pg_restore: [archiver (db)] Error from TOC entry 43; 1255 68062  
> FUNCTION st_build_histogram2d(histogram2d, text, text, text) postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  PL/ 
> pgSQL functions cannot return type histogram2d
>     Command was: CREATE FUNCTION st_build_histogram2d(histogram2d,  
> text, text, text) RETURNS histogram2d
>     AS $_$
> BEGIN
>  EXECUTE 'SET local...
> pg_restore: [archiver (db)] could not execute query: ERROR:   
> function public.st_build_histogram2d(histogram2d, text, text, text)  
> does not exist
>     Command was: ALTER FUNCTION  
> public.st_build_histogram2d(histogram2d, text, text, text) OWNER TO  
> postgres;
> pg_restore: creating FUNCTION st_pointn(geometry)
> pg_restore: [archiver (db)] Error from TOC entry 45; 1255 68140  
> FUNCTION st_pointn(geometry) postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  could  
> not access file "$libdir/liblwgeom.dll": No such file or directory
>     Command was: CREATE FUNCTION st_pointn(geometry) RETURNS geometry
>     AS '$libdir/liblwgeom.dll', 'LWGEOM_pointn_linestring'
>     LANGUAGE...
> pg_restore: [archiver (db)] could not execute query: ERROR:   
> function public.st_pointn(geometry) does not exist
>     Command was: ALTER FUNCTION public.st_pointn(geometry) OWNER TO  
> postgres;
> pg_restore: creating FUNCTION text(boolean)
> pg_restore: [archiver (db)] Error from TOC entry 46; 1255 68179  
> FUNCTION text(boolean) postgres
> pg_restore: [archiver (db)] could not execute query: ERROR:  could  
> not access file "$libdir/liblwgeom.dll": No such file or directory
>     Command was: CREATE FUNCTION text(boolean) RETURNS text
>     AS '$libdir/liblwgeom.dll', 'BOOL_to_text'
>     LANGUAGE c IMMUTABLE STRICT;
> pg_restore: [archiver (db)] could not execute query: ERROR:   
> function public.text(boolean) does not exist
>     Command was: ALTER FUNCTION public.text(boolean) OWNER TO  
> postgres;
> WARNING: errors ignored on restore: 35
>
> Process returned exit code 1.
>
> Thanks!
> Bruce
>
>
> >>> "Paul Ramsey" <pramsey at opengeo.org> 7/8/2009 3:16 PM >>>
> Backing up.
>
> There are two issues here: PostgreSQL 8.3 to 8.4; PostGIS 1.3 to 1.4.
>
> The PostgreSQL upgrade is going to require a dump-and-restore.
>
> The PostGIS upgrade does not require a dump-and-restore.
>
> So, here are some upgrade paths:
>
> - Soft upgrade, two steps: Install PostGIS 1.4 in your PgSQL 8.3  
> instance, and use postgis_upgrade.sql to upgrade your running  
> database. Dump that database. Install PgSQL 8.4 and PostGIS 1.4.  
> Restore into that database.
> - Hard upgrade, one step: Dump your PgSQL 8.3/PostGIS 1.3 database,  
> install PgSQL 8.4/PostGIS 1.4 and restore, following the hard  
> upgrade instructions. http://postgis.refractions.net/documentation/manual-1.4/ch02.html#hard_upgrade
>
> Paul
>
> On 8-Jul-09, at 3:10 PM, Bruce Rindahl wrote:
>
>> I backed up my database UDFCD from 8.3 (using pgadmin in 8.4) to  
>> backup file.
>> I created a blank database UDFCD in 8.4 from the template0.  The  
>> restore from pgadmin gives:
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20090708/f4a94b79/attachment.html>


More information about the postgis-devel mailing list