Re: Built-in support for a memory consumption ulimit? - Mailing list pgsql-hackers

From Noah Misch
Subject Re: Built-in support for a memory consumption ulimit?
Date
Msg-id 20140620032435.GD1069299@tornado.leadboat.com
Whole thread Raw
In response to Re: Built-in support for a memory consumption ulimit?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Jun 17, 2014 at 04:39:51PM -0400, Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > We could do better by accounting for memory usage ourselves, inside
> > the memory-context system, but that'd probably impose some overhead we
> > don't have today.

> I wonder how practical it would be to forestall Noah's scenario by
> preallocating all the stack space we want before enabling the rlimit.

I think that's worth a closer look.  Compared to doing our own memory usage
tracking, it has the major advantage of isolating the added CPU overhead at
backend start.

-- 
Noah Misch
EnterpriseDB                                 http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: idle_in_transaction_timeout
Next
From: Amit Langote
Date:
Subject: Re: Proposal for CSN based snapshots