[postgis-users] memory usage of st_clip/st_intersection in a session

Bborie Park dustymugs at gmail.com
Tue Jun 2 11:51:56 PDT 2015


Based upon your description, I can't guess as to the cause of the memory
leak(?). Can you post the query and provide some information (spatial
extent, # of features) about the rasters (tile size, # of bands, in-db or
out-db) and the geometries (same SRID of raster, maximum # of vertices per
polygon)?

-bborie


On Tue, Jun 2, 2015 at 11:39 AM, Bergenroth, Brandon <bbergenroth at rti.org>
wrote:

> I have thousands of polygons that I clip/intersect with various rasters
> and calculate area-weighted values, etc.
>
> I have created a function which returns a table of attributes and it works
> like a charm when calling it for a specific polygon and raster.  However
> when I call this function over and over again in a single session, the
> memory used by the PostgreSQL process continues to climb and instead of the
> function returning in the few seconds it normally does, it starts to take
> longer and longer and will just churn on one polygon for a long time to the
> point of never returning.  Now if I open another session and run that
> particular polygon it comes right back so I know it is not the data or the
> function.
>
> If I batch up the polygons and execute them in a new connection each time
> then they all finish in a timely manner.
>
> It would be hard for me to produce a test case given the amount of data
> I'm working with, but is there anything I am obviously missing here?  It is
> not such a burden to do each one in a new connection but that is obviously
> not ideal.
>
> Thanks for any suggestions.
>
> Brandon Bergenroth
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150602/9deeb822/attachment.html>


More information about the postgis-users mailing list