Re: PostgreSQL Performance on OpenBSD - Mailing list pgsql-general

From Jim C. Nasby
Subject Re: PostgreSQL Performance on OpenBSD
Date
Msg-id 20030521192234.GO40542@flake.decibel.org
Whole thread Raw
In response to Re: PostgreSQL Performance on OpenBSD  (Doug McNaught <doug@mcnaught.org>)
List pgsql-general
On Mon, May 19, 2003 at 08:50:31PM -0400, Doug McNaught wrote:
> "Jim C. Nasby" <jim@nasby.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.  :)

Where would you do the ulimit? In the pgsql ~/.profile?

More importantly, what happens when this limit is hit? I'm guessing the
engine would fail, which isn't very helpful. If the server tracked
resource usage on it's own, it would be able to throttle back things
like sort memory when things started getting tight.
--
Jim C. Nasby (aka Decibel!)                    jim@nasby.net
Member: Triangle Fraternity, Sports Car Club of America
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

pgsql-general by date:

Previous
From: Andrew Ayers
Date:
Subject: Re: "IN" statement causing execution cancel?
Next
From: Tom Lane
Date:
Subject: Re: ERROR: Memory exhausted in AllocSetAlloc(188)