Re: Add the ability to limit the amount of memory that can be allocated to backends. - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: Add the ability to limit the amount of memory that can be allocated to backends.
Date
Msg-id 20220901.114840.1629861209007649117.horikyota.ntt@gmail.com
Whole thread Raw
In response to Add the ability to limit the amount of memory that can be allocated to backends.  (Reid Thompson <reid.thompson@crunchydata.com>)
Responses Re: Add the ability to limit the amount of memory that can be allocated to backends.
List pgsql-hackers
At Wed, 31 Aug 2022 12:50:19 -0400, Reid Thompson <reid.thompson@crunchydata.com> wrote in 
> Hi Hackers,
> 
> Add the ability to limit the amount of memory that can be allocated to
> backends.

The patch seems to limit both of memory-context allocations and DSM
allocations happen on a specific process by the same budget. In the
fist place I don't think it's sensible to cap the amount of DSM
allocations by per-process budget.

DSM is used by pgstats subsystem. There can be cases where pgstat
complains for denial of DSM allocation after the budget has been
exhausted by memory-context allocations, or every command complains
for denial of memory-context allocation after once the per-process
budget is exhausted by DSM allocations. That doesn't seem reasonable.


regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: pg15b3: recovery fails with wal prefetch enabled
Next
From: Jeff Janes
Date:
Subject: Re: Instrumented pages/tuples frozen in autovacuum's server log out (and VACUUM VERBOSE)