Re: Use BumpContext contexts for TupleHashTables' tablecxt - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Use BumpContext contexts for TupleHashTables' tablecxt
Date
Msg-id 2314283.1761537338@sss.pgh.pa.us
Whole thread Raw
In response to Re: Use BumpContext contexts for TupleHashTables' tablecxt  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Use BumpContext contexts for TupleHashTables' tablecxt
List pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes:
>> On Mon, 27 Oct 2025 at 09:55, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> I looked at the callers of BuildTupleHashTable, and realized that
>>> (a) every one of them can use a BumpContext for the "tablecxt",
>>> and (b) Jeff Davis already noticed that for nodeAgg.c, in commit
>>> cc721c459.  So we have precedent for the idea working.  Here's
>>> a fleshed-out patch to fix the remaining callers.

> I just did a quick test of this with the best-case I could imagine,
> where all rows are filtered, thus reducing the additional overhead of
> going into other nodes. Patched came out about 9% faster than master
> (without MEMORY_CONTEXT_CHECKING).

Hmm, I wasn't really expecting any direct time saving; the point
was about cutting memory consumption.  So Chao Li's nearby results
are in line with mine.

            regards, tom lane



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Enhance statistics reset functions to return reset timestamp
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: issue with synchronized_standby_slots