[postgis-users] Recursive query - ERROR: invalid memory alloc request size 1073741824
Shaozhong SHI
shishaozhong at gmail.com
Sat May 7 19:41:37 PDT 2022
Thanks.
I am doing data testing to check out traversibility of submitted network
data.
To assess the extent of correctness of line to line connections.
I will ask our DBA team to see whether the memory allocation error can be
resolved.
I will try out generate start node and endnote from lines present and try
out traversibility testing.
Regards,. David
On Sunday, 8 May 2022, Imre Samu <pella.samu at gmail.com> wrote:
> > I am thinking of generating startnode and endnode values by using
> St_startpoint(geom) and ST_endpoint(geom),
> > Is this feasible?
>
> if your input data is “noded” correctly - then YES ...
> “noded” network = at every intersection in your road/water network all
> the edges will be broken into separate road/water segments.
> And you have to assign the same "node id" for the same physical points. (
> ST_DWithin magic )
>
> be careful: The "Network Walking" example was a nodded network ( without
> an intersection! )
> maybe you can test the https://postgis.net/docs/CreateTopology.html
> function also;
>
> Imre
>
>
> Shaozhong SHI <shishaozhong at gmail.com> ezt írta (időpont: 2022. máj. 8.,
> V, 3:38):
>
>> Testing shows that using startnode and endnode of id values of a line
>> does lead to a fast completion of processing.
>> However, at the moment, I am not sure whether these startnode (id values)
>> and endnode (id values) are correct.
>>
>> I am thinking of generating startnode and endnode values by using
>> St_startpoint(geom) and ST_endpoint(geom),
>>
>> And then try out your alternative method for recursive query to see
>> whether walk the network works.
>>
>> Is this feasible?
>>
>> Regards,
>>
>> David
>>
>> On Sun, 8 May 2022 at 00:59, Imre Samu <pella.samu at gmail.com> wrote:
>>
>>> Hi David,
>>> > There is a loop of recursive query. It runs at a point where it stops.
>>> >Can anyone provide pointers how to solve this problem or work around?
>>>
>>> Please share "this" recursive query;
>>>
>>> My guess: Probably you have a "forever/endless loop" in your data; *so
>>> you have to LIMIT the recursive part ;*
>>>
>>> related links :
>>> 1.) with limiting "depth" ( where depth < 1000 )
>>> "Prevent infinite loop in recursive query in Postgresql"
>>> https://stackoverflow.com/questions/51025607/prevent-
>>> infinite-loop-in-recursive-query-in-postgresql
>>> 2.) with LIMITING clause
>>> https://www.cybertec-postgresql.com/en/recursive-queries-postgresql/
>>> *"This example also demonstrates how an endless loop can be avoided with
>>> a LIMIT clause on the parent query."*
>>>
>>> Regards,
>>> Imre
>>>
>>> Shaozhong SHI <shishaozhong at gmail.com> ezt írta (időpont: 2022. máj.
>>> 7., Szo, 15:23):
>>>
>>>> There is a loop of recursive query. It runs at a point where it stops.
>>>>
>>>> This error turned up.- ERROR: invalid memory alloc request size
>>>> 1073741824
>>>>
>>>> Can anyone provide pointers how to solve this problem or work around?
>>>>
>>>> Regards,
>>>>
>>>> David
>>>> _______________________________________________
>>>> postgis-users mailing list
>>>> postgis-users at lists.osgeo.org
>>>> https://lists.osgeo.org/mailman/listinfo/postgis-users
>>>>
>>> _______________________________________________
>>> postgis-users mailing list
>>> postgis-users at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/postgis-users
>>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/postgis-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20220508/fe310fb5/attachment.htm>
More information about the postgis-users
mailing list