On Wed, 12 May 2004, Guido Fiala wrote:
> Reading all this i'd like to know if all this isn't just a tradeof between
> _where_ the memory is consumed?
>
> If your backend uses Cursors - it caches the whole resultset and probably
> starts swapping and gets slow (needs the memory of all users).
>
The backend spools to a file when a materialized cursor uses more than
sort_mem amount of memory. This is not quite the same as swapping as it
will consume disk bandwidth, but it won't hog memory from other
applications.
Kris Jurka