Re: Missing pfree in logical_heap_rewrite_flush_mappings() - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Missing pfree in logical_heap_rewrite_flush_mappings()
Date
Msg-id 20140326164941.GS4582@tamriel.snowman.net
Whole thread Raw
In response to Missing pfree in logical_heap_rewrite_flush_mappings()  (Ants Aasma <ants@cybertec.at>)
Responses Re: Missing pfree in logical_heap_rewrite_flush_mappings()  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
* 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.

Hmm, yeah, it does look that way.  Why bother pfree'ing it here though
instead of letting it be cleaned up with state->rs_cxt in
end_heap_rewrite()?
Thanks,        Stephen

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: small regression adjustment
Next
From: Tom Lane
Date:
Subject: Re: small regression adjustment