[postgis-users] postgis_restore.pl loads no data (pg-8.1, postgis-1.1)

Benjamin Thelen bt at ccgis.de
Fri Jan 13 07:45:13 PST 2006


I ran the following tests:

Two different dumps made with "pg_dump -O -Fc" from two FreeBSD-6 boxes 
running postgresql-8.0.4/postgis-1.0.4.

I have three FreeBSD 6 boxes running postgresql-8.1.2/postgis-1.1.0 and 
one Ubuntu box running postgresql-8.0.4/postgis-1.1.0.

All dumps stopped at the same stage as shown in my first mail:

---------------------------------------------------------------
-- END
---------------------------------------------------------------
COMMIT;
COMMIT
DROP TABLE geometry_columns;DROP TABLE spatial_ref_sys;
DROP TABLE
DROP TABLE


PostGIS functions are uploaded, but no data. The prompt is not shown, 
what indicates that something is waiting, not doing the exepected or 
whatever (Ctrl+C is required).


The most interesting part for me is that as I downgraded postgis-1.1.0 
to postgis-1.0.6 on a FreeBSD box running postgresql-8.1.2 I succeeded 
uploading the dump!


I also made a regression test on this machine, showing a successfull run:


$ gmake test
gmake -C regress test
gmake[1]: Entering directory `/usr/data/tmp/postgis-1.1.0/regress'

Creating spatial db postgis_reg

  PostgreSQL 8.1.2 on i386-portbld-freebsd6.0, compiled by GCC cc (GCC) 
3.4.4 [FreeBSD] 20050518
  Postgis 1.1.0 - 2006-01-13 11:55:43
    GEOS: 2.2.1-CAPI-1.0.1
    PROJ: Rel. 4.4.9, 29 Oct 2004

Running tests

            regress: Ok.
      regress_index: Ok.
     lwgeom_regress: Ok.
        regress_lrs: Ok.
        removepoint: Ok.
           setpoint: Ok.
        regress_ogc: Ok.
     regress_bdpoly: Ok.
       regress_proj: Ok.

Run tests: 9
Successful: 9
Failed: 0
gmake[1]: Leaving directory `/usr/data/tmp/postgis-1.1.0/regress'



Any idea?


Thanks,
Ben






strk at refractions.net schrieb:
> Please give postgis_restore.pl a try and let use know.
> 
> --strk;
> 
> On Thu, Jan 12, 2006 at 07:50:19PM +0100, Benjamin Thelen wrote:
>> Hi list,
>>
>> I backed up a postgresql/postgis DB from a 
>> postgresql-8.0.4/postgis-1.0.4 combination and tried to restore the dump 
>> into a 8.1.2/1.1.0 combination and failed. It seems that all 
>> (functions,..) but the data itself is uploaded. The procedure just stops 
>> as it seems without any error message. Please have a look at the end of 
>> the output below.
>>
>> The most interesting part is that I also tried to upload the same dump 
>> into the same DB but using an old postgis_restore.pl from postgis-1.0.4 
>> and succeeded! At least it seems at first glance. In this case the 
>> output doesn't stop as you see below, but continues to load the data 
>> itself into the database.
>>
>>
>> I couldn't find anything on the internet, just the information, that 
>> postgis itself is pg-8.1 compatible and postgis_restore.pl hasn't 
>> officially been testet with this pg version.
>>
>>
>> I'm a bit at a loss. Do I have to go back to 8.0? Is there something 
>> I've overlooked, I can do?
>>
>> Thanks,
>> Ben
>>
>>
>> .
>> .
>> .
>> LANGUAGE 'plpgsql' IMMUTABLE STRICT;
>> CREATE FUNCTION
>> --
>> -- SFSQL 1.1
>> --
>> -- BdMPolyFromText(multiLineStringTaggedText String, SRID Integer):
>> MultiPolygon
>> --
>> --  Construct a MultiPolygon given an arbitrary
>> --  collection of closed linestrings as a
>> --  MultiLineString text representation.
>> --
>> -- This is a PLPGSQL function rather then an SQL function
>> -- To raise an exception in case of invalid input.
>> --
>> CREATE OR REPLACE FUNCTION BdMPolyFromText(text, integer)
>> RETURNS geometry
>> AS '
>> DECLARE
>> 	geomtext alias for $1;
>> 	srid alias for $2;
>> 	mline geometry;
>> 	geom geometry;
>> BEGIN
>> 	mline := MultiLineStringFromText(geomtext, srid);
>>
>> 	IF mline IS NULL
>> 	THEN
>> 		RAISE EXCEPTION ''Input is not a MultiLinestring'';
>> 	END IF;
>>
>> 	geom := multi(BuildArea(mline));
>>
>> 	RETURN geom;
>> END;
>> '
>> LANGUAGE 'plpgsql' IMMUTABLE STRICT;
>> CREATE FUNCTION
>> ---------------------------------------------------------------
>> -- END
>> ---------------------------------------------------------------
>> COMMIT;
>> COMMIT
>> DROP TABLE geometry_columns;DROP TABLE spatial_ref_sys;
>> DROP TABLE
>> DROP TABLE
>>
>>
>> _______________________________________________
>> 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