<div dir="ltr">Testing shows that using startnode and endnode of id values of a line does lead to a fast completion of processing.<div>However, at the moment, I am not sure whether these startnode (id values) and endnode (id values) are correct.</div><div><br></div><div>I am thinking of generating startnode and endnode values by using St_startpoint(geom) and ST_endpoint(geom),</div><div><br></div><div>And then try out your alternative method for recursive query to see whether walk the network works.</div><div><br></div><div>Is this feasible?</div><div><br></div><div>Regards,</div><div><br></div><div>David</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 8 May 2022 at 00:59, Imre Samu <<a href="mailto:pella.samu@gmail.com">pella.samu@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi David,</div><div>> There is a loop of recursive query. It runs at a point where it stops.</div><div>>Can anyone provide pointers how to solve this problem or work around?<br></div><div><br></div><div>Please share "this" recursive query;</div><div><br></div><div>My guess: Probably you have a "forever/endless loop" in your data; <b><font color="#0000ff">so you have to LIMIT the recursive part ;</font></b></div><div><br></div><div>related links :</div><div>1.) with limiting "<span style="background-color:transparent;font-family:inherit;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;white-space:inherit">depth</span><span style="background-color:transparent;font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;white-space:inherit;margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;font-size:13px;vertical-align:baseline;box-sizing:inherit">" ( </span><span style="background-color:transparent;font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;white-space:inherit;margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;font-size:13px;vertical-align:baseline;box-sizing:inherit">where</span><span style="background-color:transparent;font-family:inherit;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;white-space:inherit"> depth </span><span style="background-color:transparent;font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;white-space:inherit;margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;font-size:13px;vertical-align:baseline;box-sizing:inherit"><</span><span style="background-color:transparent;font-family:inherit;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;white-space:inherit"> </span><span style="background-color:transparent;font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;white-space:inherit;margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;font-size:13px;vertical-align:baseline;box-sizing:inherit">1000 )</span></div><div>"Prevent infinite loop in recursive query in Postgresql"</div><div><a href="https://stackoverflow.com/questions/51025607/prevent-infinite-loop-in-recursive-query-in-postgresql" target="_blank">https://stackoverflow.com/questions/51025607/prevent-infinite-loop-in-recursive-query-in-postgresql</a><br></div><div>2.) with LIMITING clause</div><div><a href="https://www.cybertec-postgresql.com/en/recursive-queries-postgresql/" target="_blank">https://www.cybertec-postgresql.com/en/recursive-queries-postgresql/</a> <br></div><i>"This example also demonstrates how <font color="#0000ff">an endless loop can be avoided with a LIMIT clause </font>on the parent query."</i><div><br></div><div>Regards,</div><div> Imre</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Shaozhong SHI <<a href="mailto:shishaozhong@gmail.com" target="_blank">shishaozhong@gmail.com</a>> ezt írta (időpont: 2022. máj. 7., Szo, 15:23):<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">There is a loop of recursive query. It runs at a point where it stops.<div><br></div><div>This error turned up.- ERROR: invalid memory alloc request size 1073741824</div><div><br></div><div>Can anyone provide pointers how to solve this problem or work around?</div><div><br></div><div>Regards,</div><div><br></div><div>David</div></div></div>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><br>
</blockquote></div>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><br>
</blockquote></div>