Hi, On 08/09/2010 08:45 PM, Robert Haas wrote:
Yeah, I think that's a real concern. I think we need to distinguish memory needs from memory wants. Ideally, we'd like our entire database to be cached in RAM. But that may or may not be feasible, so we page what we can into shared_buffers and page out as necessary to make room for other things. In contrast, the traditional malloc() approach doesn't give you much flexibility: if it returns NULL, you pretty much have to fail whatever operation you were trying to perform. For some things, that's OK. For other things, it's not.
Agreed, it's going to be a difficult compromise and it possibly is very hard to find a good one automatically. However, I doubt our current approach with hard limits between subsystems is the best compromise.
Regards Markus Wanner -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers