Re: Add the ability to limit the amount of memory that can be allocated to backends.

From: Reid Thompson <reid(dot)thompson(at)crunchydata(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: reid(dot)thompson(at)crunchydata(dot)com, vignesh C <vignesh21(at)gmail(dot)com>, Arne Roland <A(dot)Roland(at)index(dot)de>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com>
Subject: Re: Add the ability to limit the amount of memory that can be allocated to backends.
Date: 2023-02-02 15:41:55
Message-ID: ed95f763d13e7c5d7198b7bd6def23f39e909fcf.camel@crunchydata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Regarding the shared counter noted here,

> What you could do is to have a single, imprecise, shared counter for the total
> memory allocation, and have a backend-local "allowance". When the allowance is
> used up, refill it from the shared counter (a single atomic op).

Is there a preferred or suggested location to put variables like this?
Perhaps a current variable to use as a reference?

Thanks,
Reid

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2023-02-02 15:53:37 Re: Improve logging when using Huge Pages
Previous Message Andres Freund 2023-02-02 15:26:06 Re: Error "initial slot snapshot too large" in create replication slot