This particular version of PostGIS has a bug when calculating a
buffer() on very complex segments, which causes the query to take more and more memory until the entire machine gets stuck.
I'm looking for a PostgreSQL mechanism that can:
- Limit the memory consumption (and perhaps other resources) used by a specific query.
- Automatically stop queries whose execution time exceeds a certain threshold.