Re: PATCH: decreasing memory needlessly consumed by array_agg

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tomas Vondra <tv(at)fuzzy(dot)cz>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PATCH: decreasing memory needlessly consumed by array_agg
Date: 2014-12-21 01:54:16
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Tomas Vondra wrote:
> Attached is v5 of the patch, fixing an error with releasing a shared
> memory context (invalid flag values in a few calls).

The functions that gain a new argument should get their comment updated,
to explain what the new argument is for.

Also, what is it with this hunk?

> @@ -4768,6 +4770,9 @@ makeMdArrayResult(ArrayBuildState *astate,
> MemoryContextSwitchTo(oldcontext);
> + /* we can only release the context if it's a private one. */
> + // Assert(! (release && !astate->private_cxt));
> +
> /* Clean up all the junk */
> if (release)
> MemoryContextDelete(astate->mcontext);

Álvaro Herrera
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2014-12-21 06:42:04 Re: Parallel Seq Scan
Previous Message Peter Geoghegan 2014-12-21 00:30:14 Re: Doing better at HINTing an appropriate column within errorMissingColumn()