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

From Reid Thompson
Subject Re: Add the ability to limit the amount of memory that can be allocated to backends.
Date
Msg-id 9b5226bf88ed5f09c7ae589a11c8fd147854eb98.camel@crunchydata.com
Whole thread Raw
In response to Re: Add the ability to limit the amount of memory that can be allocated to backends.  (Andres Freund <andres@anarazel.de>)
Responses Re: Add the ability to limit the amount of memory that can be allocated to backends.
List pgsql-hackers
On Mon, 2023-01-23 at 12:31 -0800, Andres Freund wrote:
> Hi,
>
> I think it's basically still waiting on author, until the O(N) cost is gone
> from the overflow limit check.
>
> Greetings,
>
> Andres Freund

Yes, just a rebase. There is still work to be done per earlier in the
thread.

I do want to follow up and note re palloc/pfree vs malloc/free that the
tracking code (0001-Add-tracking-...) is not tracking palloc/pfree but is
explicitely tracking malloc/free. Not every palloc/pfree call executes the
tracking code, only those where the path followed includes malloc() or
free().  Routine palloc() calls fulfilled from the context's
freelist/emptyblocks/freeblock/etc and pfree() calls not invoking free()
avoid the tracking code.

Thanks,
Reid




pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: suppressing useless wakeups in logical/worker.c
Next
From: Peter Geoghegan
Date:
Subject: Re: New strategies for freezing, advancing relfrozenxid early