> You can’t cap memory, but ...
Why not? That'd be useful. Feels like a software written in C should make that reasonably easy.
Why not? That'd be useful. Feels like a software written in C should make that reasonably easy.
or more probably the c api setrlimit(2)
RLIMIT_RSS
This is a limit (in bytes) on the process's resident set (the number of virtual pages resident in RAM). This limit has effect only in Linux 2.4.x, x < 3 and there affects only calls to madvise(2) specifying MADV_WILLNEED.
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.