* Andres Freund ([email protected]) wrote: > On 2014-03-26 13:41:27 -0400, Stephen Frost wrote: > > > Good catch. There's actually no need for explicitly using the context, > > > we're in the appropriate one. The only other MemoryContextAlloc() caller > > > in there should be converted to a palloc as well. > > > > Hrm..? I don't think that's right when it's called from > > end_heap_rewrite(). > > You're right. Apprently I shouldn't look at patches while watching a > keynote ;)
No problem- but that's also why I was thinking we should just wrap
end_heap_rewrite() in a context as well, otherwise the next person who
comes along to add a bit of code here may end up making the same
mistake. Is there something you're concerned about there?
> > Perhaps we should be switching to state->rs_cxt
> > while in end_heap_rewrite() also though?
>
> I think just applying Aant's patch is fine.
I have no problem *also* doing the pfree() to address the concern about
the transient memory usage being more than we'd like.
Thanks,
Stephen
signature.asc
Description: Digital signature
