Re: Missing pfree in logical_heap_rewrite_flush_mappings()

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Ants Aasma <ants(at)cybertec(dot)at>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>
Subject: Re: Missing pfree in logical_heap_rewrite_flush_mappings()
Date: 2014-03-26 16:49:41
Message-ID: 20140326164941.GS4582@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Ants Aasma (ants(at)cybertec(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-03-26 16:52:11 Re: small regression adjustment
Previous Message Andrew Dunstan 2014-03-26 16:47:25 Re: small regression adjustment