<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
I am having a problem that I can't explain.<br>
<br>
I have a 2 node Slony DB system.<br>
<tt>Node 1: Ubuntu 10, Postgres 8.4.13-0ubuntu10.04, PostGIS 1.4.0-2</tt><tt>,
libgeos </tt><tt>3.1.0-1</tt><tt><br>
</tt><tt>Node 2: Ubuntu 10, Postgres 8.4.3-1, PostGIS 1.4.0-2,
libgeos 3.1.0-1</tt><tt><br>
</tt><br>
I have a polygon geometric in my database:<br>
<tt><br>
</tt><tt> Table "public.table"</tt><tt><br>
</tt><tt> Column | Type | Modifiers </tt><tt><br>
</tt><tt>---------------+--------<font color="#3366ff">-</font>------+-----------</tt><tt><br>
</tt><tt> id | integer | not null</tt><tt><br>
</tt><tt> geom | geometry | </tt><tt><br>
</tt><tt>Indexes:</tt><tt><br>
</tt><tt> "tbl_geom_idx" gist (geom)</tt><tt><br>
</tt><tt>Check constraints:</tt><tt><br>
</tt><tt> "enforce_dims_geom" CHECK (ndims(geom) = 2)</tt><tt><br>
</tt><tt> "enforce_srid_geom" CHECK (srid(geom) = 4269)</tt><tt><br>
</tt><br>
Which works just fine on Node1:<br>
<tt>select st_astext(geom) from table where rid = 1;</tt><tt><br>
</tt> <tt><br>
</tt><tt> POLYGON((-94.3043033 38.8722515,-94.3047635
38.8672929,-94.303613 38.8674323,-94.3028972 38.868209,-94.3015677
38.8682687,-94.3001871 38.8684878,-94.2983464
38.8695432,-94.2968124 38.869583,-94.2952273
38.8696826,-94.2948182 38.8699813,-94.2946392
38.8704393,-94.2944858 38.8706385,-94.2938722
38.8706783,-94.2933609 38.8706385,-94.2923127
38.8706385,-94.2919548 38.8708774,-94.2917758
38.8711164,-94.2917247 38.8717138,-94.30167 38.8721121,-94.3040732
38.872132,-94.3043033 38.8722515))</tt><tt><br>
</tt> <br>
But if I try the same thing on Node 2:<br>
<tt>select st_astext(geom) from table where rid = 1;</tt><tt><br>
</tt> <tt><br>
</tt><tt>ERROR: geometry contains non-closed rings</tt><tt><br>
</tt><br>
And in my postgres log:<br>
<tt>2012-11-02 15:23:24 CDT ERROR: geometry contains non-closed
rings</tt><tt><br>
</tt><tt>2012-11-02 15:23:24 CDT STATEMENT: select st_astext(geom)
from table where rid = 1;</tt><tt><br>
</tt><br>
But I can can select the points individually on Node 2:<br>
<tt>select 100 + generate_series(1, ST_npoints(geom)-1) as sequence,
ST_Y(pointn(ExteriorRing(geom), generate_series(1,
ST_npoints(geom)-1)))::numeric(10,7) as lat,
ST_X(pointn(ExteriorRing(geom), generate_series(1,
ST_npoints(geom)-1)))::numeric(10,7) as lon from table where id =
1 order by 1;</tt><tt><br>
</tt><tt><br>
</tt><tt> sequence | lat | lon </tt><tt><br>
</tt><tt>----------+------------+-------------</tt><tt><br>
</tt><tt> 101 | 38.8722515 | -94.3043033</tt><tt><br>
</tt><tt> 102 | 38.8672929 | -94.3047635</tt><tt><br>
</tt><tt> 103 | 38.8674323 | -94.3036130</tt><tt><br>
</tt><tt> 104 | 38.8682090 | -94.3028972</tt><tt><br>
</tt><tt> 105 | 38.8682687 | -94.3015677</tt><tt><br>
</tt><tt> 106 | 38.8684878 | -94.3001871</tt><tt><br>
</tt><tt> 107 | 38.8695432 | -94.2983464</tt><tt><br>
</tt><tt> 108 | 38.8695830 | -94.2968124</tt><tt><br>
</tt><tt> 109 | 38.8696826 | -94.2952273</tt><tt><br>
</tt><tt> 110 | 38.8699813 | -94.2948182</tt><tt><br>
</tt><tt> 111 | 38.8704393 | -94.2946392</tt><tt><br>
</tt><tt> 112 | 38.8706385 | -94.2944858</tt><tt><br>
</tt><tt> 113 | 38.8706783 | -94.2938722</tt><tt><br>
</tt><tt> 114 | 38.8706385 | -94.2933609</tt><tt><br>
</tt><tt> 115 | 38.8706385 | -94.2923127</tt><tt><br>
</tt><tt> 116 | 38.8708774 | -94.2919548</tt><tt><br>
</tt><tt> 117 | 38.8711164 | -94.2917758</tt><tt><br>
</tt><tt> 118 | 38.8717138 | -94.2917247</tt><tt><br>
</tt><tt> 119 | 38.8721121 | -94.3016700</tt><tt><br>
</tt><tt> 120 | 38.8721320 | -94.3040732</tt><tt><br>
</tt><tt>(20 rows)</tt><br>
<br>
So I am stumped. I do see this on node 2:<br>
<tt>select st_isvalid(geom), st_isvalidreason(geom) from
message_locate_polygon where id = 1;</tt><tt><br>
</tt><tt>NOTICE: IllegalArgumentException: points must form a
closed linestring</tt><tt><br>
</tt><tt>NOTICE: IllegalArgumentException: points must form a
closed linestring</tt><tt><br>
</tt><tt>ERROR: POSTGIS2GEOS conversion failed</tt><tt><br>
</tt><br>
Any thoughts? I suspect that upgrading postgres on node 2 would
solve it, but I since I don't know the cause of the error, I am
still concerned.<br>
<br>
Thanks in advance,<br>
<br>
- B
</body>
</html>