<div dir="ltr"><div>Hello there,</div><div><br></div><div>this is my first post to this mailing list, so first I'd like to thank the community for supporting this marvelous piece of software. I perform most of my research and data processing in PostGIS since I work mostly with vector data in visualize-in-web use cases for most of my projects, but I rely on GRASS GIS to perform such powerful operations like topology cleaning and building.</div><div><br></div><div>And regarding this, I'm trying to import a large table from PostGIS. It is 2GB in size. I use this:</div><div><br></div><div><div style="color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:"Droid Sans Mono","monospace",monospace,"Droid Sans Fallback";font-weight:normal;font-size:11px;line-height:15px;white-space:pre"><div><span style="color:rgb(0,0,0)">grass </span><span style="color:rgb(0,16,128)">$GRASS_DB</span><span style="color:rgb(0,0,0)">/PERMANENT --exec \</span></div><div><span style="color:rgb(0,0,0)">  v.in.ogr --verbose \</span></div><div><span style="color:rgb(0,0,0)">    input=</span><span style="color:rgb(163,21,21)">"PG:host=</span><span style="color:rgb(0,16,128)">$HOST</span><span style="color:rgb(163,21,21)"> dbname=cell_raw_data user=</span><span style="color:rgb(0,16,128)">$USER</span><span style="color:rgb(163,21,21)"> port=</span><span style="color:rgb(0,16,128)">$PORT</span><span style="color:rgb(163,21,21)"> password=</span><span style="color:rgb(0,16,128)">$PASS</span><span style="color:rgb(163,21,21)">"</span><span style="color:rgb(0,0,0)"> \</span></div><div><span style="color:rgb(0,0,0)">    layer=cat2020.buildingpart output=buildingpart</span></div><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">everything goes well until it reaches the "Finding centroid for OGR layer" step:</span></div><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">Finding centroids for OGR layer <cat2020.buildingpart>...<br>ERROR 1: server closed the connection unexpectedly<br>        This probably means the server terminated abnormally<br>        before or while processing the request.<br><br>ERROR 1: no connection to the server<br><br>ERROR 1: no connection to the server<br><br>ERROR 1: no connection to the server<br><br>ERROR 1: no connection to the server<br><br> 100%</span></div><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">The connection to PostGIS seems to be closed. I've gone through the PostgreSQL </span></div><div><span style="color:rgb(0,0,0)">configuration and tried to set up generous values for the tcp_keepalives_*</span></div><div><span style="color:rgb(0,0,0)">parameters, but to no avail. It seems to me that the PostgreSQL server drops</span></div><div><span style="color:rgb(0,0,0)">the connection due to being idle too much time. Aside from that, both PostgreSQL</span></div><div><span style="color:rgb(0,0,0)">and GRASS run in Docker containers.</span></div><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">GRASS version is 7.8.5.<br></span></div><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">Does anybody have issues importing large PostGIS tables? Any advice / ideas I can</span></div><div><span style="color:rgb(0,0,0)">research on? I've already tried to solve it by reconfiguring PostgreSQL, as said,</span></div><div><span style="color:rgb(0,0,0)">and also have done some research into Docker handling TCP, but to no avail. Any</span></div><div><span style="color:rgb(0,0,0)">idea or hint will be most welcome.<br></span></div><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">Best regards,<br></span></div></div></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">







<p>---<br></p><p><span>Juan Pedro Pérez Alcántara</span></p>
<p><span><a href="mailto:jp.perez.alcantara@gmail.com" target="_blank">jp.perez.alcantara@gmail.com</a></span></p></div></div></div></div></div></div></div>