Re: Limiting memory allocation - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Limiting memory allocation
Date
Msg-id 1772786.1653441643@sss.pgh.pa.us
Whole thread Raw
In response to Re: Limiting memory allocation  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Limiting memory allocation  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> On Tue, May 24, 2022 at 07:40:45PM -0400, Tom Lane wrote:
>> (1) There are not a predetermined number of allocations.  For example,
>> if we do a given join as nestloop+inner index scan, that doesn't require
>> any large amount of memory; but if we do it as merge or hash join then
>> it will consume memory.

> Uh, we know from the plan whether we are doing a nestloop+inner or merge
> or hash join, right?  I was suggesting we look at the plan before
> execution and set the proper percentage of work_mem for each node.

Then you just rendered all the planner's estimates fantasies.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: allow building trusted languages without the untrusted versions
Next
From: Michael Paquier
Date:
Subject: Re: Assert name/short_desc to prevent SHOW ALL segfault