Re: Shp2pgsql load error

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Shp2pgsql load error

strk
On Wed, May 25, 2005 at 09:11:42AM -0400, Kralidis,Tom [Burlington] wrote:

[...]

> devgeodb=# select postgis_full_version();
>                              postgis_full_version
> ------------------------------------------------------------------------
> -------
>  POSTGIS="1.0.0" USE_STATS DBPROC="0.1.0" RELPROC="0.3.0" (needs proc
> upgrade)

The "(needs proc upgrade)" part is telling you that your upgrade procedure
was not performed correctly.

Postgis is a library and a set of definitions.
If you upgrade the library w/out upgrading the definitions, then
the final installation state is undefined.

Read the 'Upgrading' section in postgis manual and try with a cleanly
installed database:

http://postgis.refractions.net/docs/ch02.html#upgrading

--strk;
_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Shp2pgsql load error

Kralidis,Tom [Ontario]


> -----Original Message-----
> From: Sandro Santilli [mailto:[hidden email]]
> Sent: Wednesday, 25 May, 2005 09:20
> To: Kralidis,Tom [Burlington]
> Cc: [hidden email]
> Subject: Re: [postgis-users] Shp2pgsql load error
>
>
> On Wed, May 25, 2005 at 09:11:42AM -0400, Kralidis,Tom
> [Burlington] wrote:
>
> [...]
>
> > devgeodb=# select postgis_full_version();
> >                              postgis_full_version
> >
> ----------------------------------------------------------------------
> > --
> > -------
> >  POSTGIS="1.0.0" USE_STATS DBPROC="0.1.0" RELPROC="0.3.0"
> (needs proc
> > upgrade)
>
> The "(needs proc upgrade)" part is telling you that your
> upgrade procedure was not performed correctly.
>
> Postgis is a library and a set of definitions.
> If you upgrade the library w/out upgrading the definitions,
> then the final installation state is undefined.
>
> Read the 'Upgrading' section in postgis manual and try with a
> cleanly installed database:
>
> http://postgis.refractions.net/docs/ch02.html#upgrading
>

I have updated using the "old" procedure.  Now:


devgeodb=# select postgis_full_version();
                                          postgis_full_version
------------------------------------------------------------------------
---------------------------------
 POSTGIS="1.1.0CVS" GEOS="2.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004"
USE_STATS DBPROC="0.3.0" RELPROC="0.3.0"
(1 row)

..and am getting the same error messages when trying to insert ISO8859-1
data into a UNICODE database.  PGCLIENTENCODING is defined as Latin1.

..Tom


> --strk;
>
_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Shp2pgsql load error

strk
On Wed, May 25, 2005 at 09:43:44AM -0400, Kralidis,Tom [Burlington] wrote:

>
>
> > -----Original Message-----
> > From: Sandro Santilli [mailto:[hidden email]]
> > Sent: Wednesday, 25 May, 2005 09:20
> > To: Kralidis,Tom [Burlington]
> > Cc: [hidden email]
> > Subject: Re: [postgis-users] Shp2pgsql load error
> >
> >
> > On Wed, May 25, 2005 at 09:11:42AM -0400, Kralidis,Tom
> > [Burlington] wrote:
> >
> > [...]
> >
> > > devgeodb=# select postgis_full_version();
> > >                              postgis_full_version
> > >
> > ----------------------------------------------------------------------
> > > --
> > > -------
> > >  POSTGIS="1.0.0" USE_STATS DBPROC="0.1.0" RELPROC="0.3.0"
> > (needs proc
> > > upgrade)
> >
> > The "(needs proc upgrade)" part is telling you that your
> > upgrade procedure was not performed correctly.
> >
> > Postgis is a library and a set of definitions.
> > If you upgrade the library w/out upgrading the definitions,
> > then the final installation state is undefined.
> >
> > Read the 'Upgrading' section in postgis manual and try with a
> > cleanly installed database:
> >
> > http://postgis.refractions.net/docs/ch02.html#upgrading
> >
>
> I have updated using the "old" procedure.  Now:
>
>
> devgeodb=# select postgis_full_version();
>                                           postgis_full_version
> ------------------------------------------------------------------------
> ---------------------------------
>  POSTGIS="1.1.0CVS" GEOS="2.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004"
> USE_STATS DBPROC="0.3.0" RELPROC="0.3.0"
> (1 row)
>
> ..and am getting the same error messages when trying to insert ISO8859-1
> data into a UNICODE database.  PGCLIENTENCODING is defined as Latin1.

Can you isolate a single INSERT generating the error ?

--strk;

>
> ..Tom
>
>
> > --strk;
> >
_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Rare circumstances crash pg

Simpson
Greetings,

Using POSTGIS="1.0.0" GEOS="2.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004"
DBPROC="0.3.0" RELPROC="0.3.0"

On rare occasions the server crashes with combinations of spatial functions
in the select and where.

-- THIS WORKS
select multi(Buffer(the_geom, 0)) from polygon where polyid = 6088;

-- THIS CRASHES
select multi(Buffer(the_geom, 0)) from polygon where not isvalid(the_geom)
and polyid = 6088;

I was going to package up a re-creatable scenario to include in this email,
so I copied this row to a new table that I was going to dump and include,
but upon creation of the new table, I could not get it to crash with above
query.  If I copy all the rows to the new table it crashes.  Something to do
with indexing?

Below is the data from the_geom column if that helps.

Thanks for any suggestions,
Drew.



select AsEWKT(the_geom) from polygon where polyid = 6088;

asewkt
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----------------------------------------------------------------------
 SRID=4269;MULTIPOLYGON(((-80.402277 33.445738,-80.402687
33.445463,-80.402551 33.444936,-80.402414 33.444638,-80.402114
33.444318,-80.401895 33.444226,-80.401403 33.444203,-80.401321
33.444272,-80.400447 33.443057,-80.400447 33.442986,-80.400034
33.442461,-80.39988 33.442265,-80.40001 33.442163,-80.400065
33.441705,-80.400694 33.441087,-80.400694 33.44072,-80.40053
33.440537,-80.40053 33.440308,-80.400722 33.440056,-80.401214
33.439873,-80.401296 33.439758,-80.401296 33.439254,-80.401023
33.438796,-80.401132 33.437971,-80.401406 33.437857,-80.40157
33.437674,-80.401952 33.43749,-80.402226 33.437078,-80.402254
33.436162,-80.402363 33.436001,-80.402773 33.435772,-80.405096
33.435223,-80.405506 33.434971,-80.406899 33.434651,-80.407664
33.434307,-80.408293 33.433826,-80.40873 33.43362,-80.409359
33.433529,-80.410042 33.43385,-80.410233 33.434056,-80.410096
33.434331,-80.410123 33.43456,-80.410287 33.43472,-80.41097
33.434858,-80.411872 33.435454,-80.412145 33.435798,-80.412281
33.435866,-80.41242 33.436443,-80.412524 33.436661,-80.412705
33.436984,-80.412752 33.437145,-80.412892 33.438283,-80.412949
33.43842,-80.413019 33.438521,-80.412628 33.439014,-80.411404
33.438618,-80.408885 33.441616,-80.407139 33.443694,-80.404327
33.447043,-80.402468 33.446242,-80.402277 33.445738),(-80.405358
33.440444,-80.405158 33.440426,-80.405285 33.440615,-80.405358
33.440444),(-80.408047 33.43911,-80.406924 33.438408,-80.406658
33.438408,-80.405802 33.439605,-80.405685 33.439556,-80.405623
33.439725,-80.405718 33.439662,-80.405802 33.439605,-80.406994
33.440103,-80.408047 33.43911)))
(1 row)


_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rare circumstances crash pg

strk
On Wed, May 25, 2005 at 03:04:37PM -0500, Simpson wrote:

> Greetings,
>
> Using POSTGIS="1.0.0" GEOS="2.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004"
> DBPROC="0.3.0" RELPROC="0.3.0"
>
> On rare occasions the server crashes with combinations of spatial functions
> in the select and where.
>
> -- THIS WORKS
> select multi(Buffer(the_geom, 0)) from polygon where polyid = 6088;
>
> -- THIS CRASHES
> select multi(Buffer(the_geom, 0)) from polygon where not isvalid(the_geom)
> and polyid = 6088;
>
> I was going to package up a re-creatable scenario to include in this email,
> so I copied this row to a new table that I was going to dump and include,
> but upon creation of the new table, I could not get it to crash with above
> query.  If I copy all the rows to the new table it crashes.  Something to do
> with indexing?

Index should not be used in your query (check out explain output).
See if explain gives you different plans in the two cases.
Also, aren't you getting an exception buffering invalid geometries ?
Can it be you didn't compile postgresql with -lstdc++ (required
to cleanly handle C++ exceptions thrown by GEOS) ?

Finally, could you try out 2.1.2cvs version of GEOS (it's in branch-2-1
of GEOS cvs).

--strk;


> Below is the data from the_geom column if that helps.
>
> Thanks for any suggestions,
> Drew.
>
>
>
> select AsEWKT(the_geom) from polygon where polyid = 6088;
>
> asewkt
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> ----------------------------------------------------------------------------
> -----------------------------------------------------------------------
>  SRID=4269;MULTIPOLYGON(((-80.402277 33.445738,-80.402687
> 33.445463,-80.402551 33.444936,-80.402414 33.444638,-80.402114
> 33.444318,-80.401895 33.444226,-80.401403 33.444203,-80.401321
> 33.444272,-80.400447 33.443057,-80.400447 33.442986,-80.400034
> 33.442461,-80.39988 33.442265,-80.40001 33.442163,-80.400065
> 33.441705,-80.400694 33.441087,-80.400694 33.44072,-80.40053
> 33.440537,-80.40053 33.440308,-80.400722 33.440056,-80.401214
> 33.439873,-80.401296 33.439758,-80.401296 33.439254,-80.401023
> 33.438796,-80.401132 33.437971,-80.401406 33.437857,-80.40157
> 33.437674,-80.401952 33.43749,-80.402226 33.437078,-80.402254
> 33.436162,-80.402363 33.436001,-80.402773 33.435772,-80.405096
> 33.435223,-80.405506 33.434971,-80.406899 33.434651,-80.407664
> 33.434307,-80.408293 33.433826,-80.40873 33.43362,-80.409359
> 33.433529,-80.410042 33.43385,-80.410233 33.434056,-80.410096
> 33.434331,-80.410123 33.43456,-80.410287 33.43472,-80.41097
> 33.434858,-80.411872 33.435454,-80.412145 33.435798,-80.412281
> 33.435866,-80.41242 33.436443,-80.412524 33.436661,-80.412705
> 33.436984,-80.412752 33.437145,-80.412892 33.438283,-80.412949
> 33.43842,-80.413019 33.438521,-80.412628 33.439014,-80.411404
> 33.438618,-80.408885 33.441616,-80.407139 33.443694,-80.404327
> 33.447043,-80.402468 33.446242,-80.402277 33.445738),(-80.405358
> 33.440444,-80.405158 33.440426,-80.405285 33.440615,-80.405358
> 33.440444),(-80.408047 33.43911,-80.406924 33.438408,-80.406658
> 33.438408,-80.405802 33.439605,-80.405685 33.439556,-80.405623
> 33.439725,-80.405718 33.439662,-80.405802 33.439605,-80.406994
> 33.440103,-80.408047 33.43911)))
> (1 row)
>
>
> _______________________________________________
> postgis-users mailing list
> [hidden email]
> http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Shp2pgsql load error

Kralidis,Tom [Ontario]
In reply to this post by strk

UPDATE:

I did a fresh install of PostgreSQL 8.0.3 and PostGIS latest CVS (with
USE_ICONV=1).  This command:

/usr/local/pgsql/bin/shp2pgsql  -W ISO8859-1 wshed_p public.wshed_p |
/usr/local/pgsql/bin/psql -d devgeodb -U postgres

...works.  Gremlins.

..Tom

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On
> Behalf Of [hidden email]
> Sent: Wednesday, 25 May, 2005 09:47
> To: [hidden email]
> Subject: Re: [postgis-users] Shp2pgsql load error
>
>
> On Wed, May 25, 2005 at 09:43:44AM -0400, Kralidis,Tom
> [Burlington] wrote:
> >
> >
> > > -----Original Message-----
> > > From: Sandro Santilli [mailto:[hidden email]]
> > > Sent: Wednesday, 25 May, 2005 09:20
> > > To: Kralidis,Tom [Burlington]
> > > Cc: [hidden email]
> > > Subject: Re: [postgis-users] Shp2pgsql load error
> > >
> > >
> > > On Wed, May 25, 2005 at 09:11:42AM -0400, Kralidis,Tom
> > > [Burlington] wrote:
> > >
> > > [...]
> > >
> > > > devgeodb=# select postgis_full_version();
> > > >                              postgis_full_version
> > > >
> > >
> --------------------------------------------------------------------
> > > --
> > > > --
> > > > -------
> > > >  POSTGIS="1.0.0" USE_STATS DBPROC="0.1.0" RELPROC="0.3.0"
> > > (needs proc
> > > > upgrade)
> > >
> > > The "(needs proc upgrade)" part is telling you that your
> > > upgrade procedure was not performed correctly.
> > >
> > > Postgis is a library and a set of definitions.
> > > If you upgrade the library w/out upgrading the definitions,
> > > then the final installation state is undefined.
> > >
> > > Read the 'Upgrading' section in postgis manual and try with a
> > > cleanly installed database:
> > >
> > > http://postgis.refractions.net/docs/ch02.html#upgrading
> > >
> >
> > I have updated using the "old" procedure.  Now:
> >
> >
> > devgeodb=# select postgis_full_version();
> >                                           postgis_full_version
> >
> ----------------------------------------------------------------------
> > --
> > ---------------------------------
> >  POSTGIS="1.1.0CVS" GEOS="2.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004"
> > USE_STATS DBPROC="0.3.0" RELPROC="0.3.0"
> > (1 row)
> >
> > ..and am getting the same error messages when trying to insert
> > ISO8859-1 data into a UNICODE database.  PGCLIENTENCODING
> is defined
> > as Latin1.
>
> Can you isolate a single INSERT generating the error ?
>
> --strk;
>
> >
> > ..Tom
> >
> >
> > > --strk;
> > >
> _______________________________________________
> postgis-users mailing list [hidden email]
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Shp2pgsql load error

strk
In reply to this post by strk
On Thu, May 26, 2005 at 04:13:30PM -0400, Kralidis,Tom [Burlington] wrote:
>
> I did a fresh install of PostgreSQL 8.0.3 and PostGIS latest CVS (with
> USE_ICONV=1).  This command:
>
> /usr/local/pgsql/bin/shp2pgsql  -W ISO8859-1 wshed_p public.wshed_p |
> /usr/local/pgsql/bin/psql -d devgeodb -U postgres
>
> ...works.  Gremlins.

Great! Thanks for the report.
--strk;

>
> ..Tom
>
>
> > -----Original Message-----
> > From: Sandro Santilli [mailto:[hidden email]]
> > Sent: Wednesday, 25 May, 2005 13:13
> > To: Kralidis,Tom [Burlington]
> > Subject: Re: [postgis-users] Shp2pgsql load error
> >
> >
> > On Wed, May 25, 2005 at 10:07:47AM -0400, Kralidis,Tom
> > [Burlington] wrote:
> > >
> > > Here is the testcase against the *only* the bad record (file
> > > attached):
> >
> > Do I read right there's really NO quote (") at end of file ?
> > Can you send next line from file as well ? Also, are the
> > newlines really in the file or not (intermixed in the
> > geometry definition) ?
> >
> > --strk;
> >
_______________________________________________
postgis-users mailing list
[hidden email]
http://postgis.refractions.net/mailman/listinfo/postgis-users
Loading...