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

strk at refractions.net strk at refractions.net
Tue Jan 17 00:35:55 PST 2006


Ouch!
Those lines were left in during testing ...
Comment them out and everything should work.
Sorry :(
--strk;

On Mon, Jan 16, 2006 at 06:34:50PM -0700, Michael Fuhr wrote:
> On Mon, Jan 16, 2006 at 01:32:38PM +0100, strk at refractions.net wrote:
> > Still hung? What is your computed doing during the hung ?
> > Can you show initial lines of top(1) output ?
> > Can you show output/error of postgis_restore.pl run ?
> 
> I just ran some tests with PostgreSQL 8.1.2 and PostGIS 1.1.1CVS
> on FreeBSD 6.0-STABLE and Solaris 9.  Here's what I did; both systems
> behaved the same (skip to the bottom of this message to see what I
> think is wrong):
> 
>   createdb test1
>   createlang plpgsql test1
>   psql -d test1 -f lwpostgis.sql
>   psql -d test1 -f spatial_ref_sys.sql
>   pg_dump -Fc test1 > test1.dump
>   sh utils/postgis_restore.pl lwpostgis.sql test2 test1.dump > restore.log
> 
> If I now connect to test2 I see that it has no tables, not even
> geometry_columns or spatial_ref_sys.  On line 747 of restore.log I
> see this:
> 
>   Producing ascii dump test1.dump.ascii
> 
> and on lines 2562ff I see this:
> 
>   END;
>   '
>   Sourcing lwpostgis.sql
>   Dropping geometry_columns and spatial_ref_sys
>   Now source test1.dump.ascii manually
>   LANGUAGE 'plpgsql' VOLATILE STRICT; -- WITH (isstrict);
> 
> Something doesn't look right there -- three lines have been
> intermingled with a CREATE OR REPLACE FUNCTION command.  The above
> output is from the FreeBSD box; the Solaris box did the same thing
> but the lines are intermingled elsewhere (lines 3017ff).
> 
> At the end of restore.log I see this:
> 
>   ---------------------------------------------------------------
>   -- END
>   ---------------------------------------------------------------
>   COMMIT;
>   COMMIT
>   DROP TABLE geometry_columns;DROP TABLE spatial_ref_sys;
>   DROP TABLE
>   DROP TABLE
> 
> In the current directory is test1.dump.ascii; loading that file
> restores the tables:
> 
>   psql -d test2 -f test1.dump.ascii
> 
> I see the following lines near the end of the 1.1 postgis_restore.pl
> script:
> 
>   print "Now source $dumpascii manually\n";
>   exit(1);
> 
> In 1.0 those lines are commented out.  The code that follows loads
> the .dump.ascii file, but in 1.1 that code isn't reached because
> of the exit(1) statement.
> 
> -- 
> Michael Fuhr
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-- 

 /"\    ASCII Ribbon Campaign
 \ /    Respect for low technology.
  X     Keep e-mail messages readable by any computer system.
 / \    Keep it ASCII. 




More information about the postgis-users mailing list