Re: PATCH: decreasing memory needlessly consumed by array_agg - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PATCH: decreasing memory needlessly consumed by array_agg
Date
Msg-id 1342.1419184851@sss.pgh.pa.us
Whole thread Raw
In response to Re: PATCH: decreasing memory needlessly consumed by array_agg  (Tomas Vondra <tv@fuzzy.cz>)
Responses Re: PATCH: decreasing memory needlessly consumed by array_agg  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
Tomas Vondra <tv@fuzzy.cz> writes:
> i.e. either destroy the whole context if possible, and just free the
> memory when using a shared memory context. But I'm afraid this would
> penalize the shared memory context, because that's intended for cases
> where all the build states coexist in parallel and then at some point
> are all converted into a result and thrown away. Adding pfree() calls is
> no improvement here, and just wastes cycles.

FWIW, I quite dislike the terminology "shared memory context", because
it sounds too much like it means "a context in shared memory".  I see
that the patch itself doesn't use that phrase, which is good, but can
we come up with some other phrase for talking about it?
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: TABLESAMPLE patch
Next
From: Andres Freund
Date:
Subject: Re: PrivateRefCount patch has got issues