rambo00007 wrote:IF you have say a 15 gig DB, assuming postgress will know that before hand, is it still going to try and push as much of that into RAM untill it's filled. I'm confused because if that was the case there would never be any available RAM for poker client software.
This is not how file caching works in Windows. Memory used for caching files is not allocated and can be ejected for other uses immediately without the need for any disk activity. This is the reason that postgres lets Windows handle all of the database file cache because Windows is far more efficient at it.
rambo00007 wrote:I would of thought that the amount of RAM would be capped based on the work_mem variable providing it hasn't been hashed out in the .conf file to set that limit? I actually thought no data is read and stored in memory untill a query is executed and then freed up once completed then the results written to disk as a temporary cache?
Both work_mem and query memory is released by postgres when the query is completed. The only time is should be allocating large amounts of memory for itself is the shared_buffers which are allocated at start-up and during autovacuum.