"Jim C. Nasby" <jim(at)nasby(dot)net> writes:
> Hmm... this could explain some of the memory alloc errors people have
> been posting about. It would be very useful if pgsql could limit the
> amount of memory used by a connection, or better yet, used across all
> connections. This way you could ensure that you never start swapping.
Per-connection is easy: 'man ulimit'
Across all connections is possible if your system supports per-user
limits (in addition to per-process) but otherwise all the bookkeeping
would have to be done in the server, kept in shared memory and managed
with a semaphore. Somehow I doubt you'd get that patch accepted. :)
-Doug