Re: Missing pfree in logical_heap_rewrite_flush_mappings()
От | Andres Freund |
---|---|
Тема | Re: Missing pfree in logical_heap_rewrite_flush_mappings() |
Дата | |
Msg-id | 20140326182627.GE9066@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Re: Missing pfree in logical_heap_rewrite_flush_mappings() (Stephen Frost <sfrost@snowman.net>) |
Ответы |
Re: Missing pfree in logical_heap_rewrite_flush_mappings()
|
Список | pgsql-hackers |
On 2014-03-26 13:41:27 -0400, Stephen Frost wrote: > * Andres Freund (andres@2ndquadrant.com) wrote: > > On 2014-03-26 12:49:41 -0400, Stephen Frost wrote: > > > * Ants Aasma (ants@cybertec.at) wrote: > > > > It seems to me that when flushing logical mappings to disk, each > > > > mapping file leaks the buffer used to pass the mappings to XLogInsert. > > > > Also, it seems consistent to allocate that buffer in the RewriteState > > > > memory context. Patch attached. > > > > 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 ;) > 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. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: