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 http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services