Re: dynamically allocating chunks from shared memory
Markus Wanner <markus@bluegap.ch>
From: Markus Wanner <markus@bluegap.ch>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>, Alvaro Herrera <alvherre@commandprompt.com>, PostgreSQL-development Hackers <pgsql-hackers@postgresql.org>
Date: 2010-08-09T19:11:48Z
Lists: pgsql-hackers
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