| ▲ | somat 2 days ago | |
ulimit? or more probably the c api setrlimit(2) | ||
| ▲ | nh2 20 hours ago | parent | next [-] | |
That does not cap memory per query, which should be implemented by postgres explicitly to capture only the memory that really counts towards "the query" (fine-grained memory limits; ulimit is not that). | ||
| ▲ | PhilipRoman 2 days ago | parent | prev [-] | |
Be careful with the setrlimit/ulimit API family, generally it doesn't do what you want. You can limit virtual memory (but... why?) or specific segments like stack, etc. There is also RLIMIT_RSS which sounds like what you'd want, but alas:
I also disagree with the conclusion "No hardware can compensate for a query gone wrong". There are concepts like 'quality of service' and 'fairness' which PG has chosen to not implement. | ||