I have resolved the issue.<div><br></div><div>It was happening because there was a record with an empty polygon.</div><div><br></div><div>When I added this code into the query it worked successfully.</div><div><br></div><div>
CASE WHEN ST_IsEmpty(st_astext(the_geom)) THEN false ELSE st_isvalid(the_geom) END</div><div><br></div><div><br></div><div><br><div class="gmail_quote">On Fri, Jul 20, 2012 at 6:25 PM, Paul Ramsey <span dir="ltr"><<a href="mailto:pramsey@opengeo.org" target="_blank">pramsey@opengeo.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Actually, this doesn't match our fixed but, which was an index<br>
node-splitting bug that only triggered when new data was inserted. But<br>
your crash is happening then you query. The difference between the<br>
whole table and the limit query points to the problem being a specific<br>
record. The fact that you could dump the table and restore it and<br>
*still* get the problem is very surprising. The idea that it could all<br>
work for a while and then simply start failing is the most confusing<br>
part of all.<br>
<br>
Can you share<br>
<br>
(a) a dump of your table<br>
(b) the queries you run<br>
(c) the exact versions you are running<br>
(d) your operating system information<br>
(e) your hardware platform<br>
<br>
If we can replicate the bug, we can probably fix it. You don't have to<br>
share your info publicly, just email me and/or strk.<br>
<span class="HOEnZb"><font color="#888888"><br>
P.<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Fri, Jul 20, 2012 at 12:49 AM, Rebecca Clarke <<a href="mailto:r.clarke83@gmail.com">r.clarke83@gmail.com</a>> wrote:<br>
> But that doesn't explain why it's just started happening. Can you give me a<br>
> link that tells me what the bug is.<br>
> Cheers<br>
><br>
><br>
> On Thu, Jul 19, 2012 at 6:22 PM, Sandro Santilli <<a href="mailto:strk@keybit.net">strk@keybit.net</a>> wrote:<br>
>><br>
>> Sounds like a bad bug recently discovered and already fixed in the<br>
>> repository. You'll have to upgrade to 1.5.5, but it isn't out yet.<br>
>><br>
>> If you filed a bug it may put some more pressure to the release manager :)<br>
>><br>
>> --strk;<br>
>><br>
>> On Thu, Jul 19, 2012 at 05:37:12PM +0100, Rebecca Clarke wrote:<br>
>> > Hi there<br>
>> ><br>
>> > I'm running Postgresql 8.4 with postgis 1.5.<br>
>> > I have a table that contains roughly 2000 records.<br>
>> > The geometry in the table is a polygon.<br>
>> ><br>
>> > I can run the following query with no problems<br>
>> ><br>
>> > select the_geom from mytable;<br>
>> ><br>
>> > However when I run something like this:<br>
>> ><br>
>> > select st_centroid(the_geom) from mytable;<br>
>> ><br>
>> > or<br>
>> ><br>
>> > select st_isvalid(the_geom) from mytable;<br>
>> ><br>
>> > I get the following error everytime:<br>
>> ><br>
>> > 2012-07-19 17:23:47 BST LOG:  server process (PID 19445) was terminated<br>
>> > by<br>
>> > signal 11: Segmentation fault<br>
>> > 2012-07-19 17:23:47 BST LOG:  terminating any other active server<br>
>> > processes<br>
>> > 2012-07-19 17:23:47 BST LOG:  all server processes terminated;<br>
>> > reinitializing<br>
>> > 2012-07-19 17:23:47 BST LOG:  database system was interrupted; last<br>
>> > known<br>
>> > up at 2012-07-19 17:23:33 BST<br>
>> > 2012-07-19 17:23:47 BST LOG:  database system was not properly shut<br>
>> > down;<br>
>> > automatic recovery in progress<br>
>> > 2012-07-19 17:23:47 BST LOG:  record with zero length at 1406/B6388B94<br>
>> > 2012-07-19 17:23:47 BST LOG:  redo is not required<br>
>> > 2012-07-19 17:23:47 BST LOG:  autovacuum launcher started<br>
>> > 2012-07-19 17:23:47 BST LOG:  database system is ready to accept<br>
>> > connections<br>
>> ><br>
>> ><br>
>> > If I limit the query to 100 records it works.<br>
>> ><br>
>> > In the same table I have another geometry that is a point. When I run<br>
>> > the<br>
>> > st_isvalid against that, it does not error.<br>
>> ><br>
>> > What is strange is this has only just started happening. I thought it<br>
>> > was a<br>
>> > hardware issue, so I completely dumped the database and recreated it on<br>
>> > another server but the issue persisted. I'm not sure what I have done<br>
>> > wrong.<br>
>> ><br>
>> ><br>
>> > The data originates from an mdb. The geom's were stored as OLE Objects.<br>
>> > When I imported them into postgres they were bytea. I converted them<br>
>> > with<br>
>> > st_geomfromewkb(the_geom).<br>
>> ><br>
>> > Any help or directions on where I can go to figure out how to solve this<br>
>> > issue would be great.<br>
>> ><br>
>> > Thanks<br>
>> ><br>
>> > Rebecca<br>
>> _______________________________________________<br>
>> postgis-users mailing list<br>
>> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> postgis-users mailing list<br>
> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
><br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br></div>