From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Bruce Momjian <bruce(at)momjian(dot)us>, Ants Aasma <ants(at)cybertec(dot)at>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: Missing pfree in logical_heap_rewrite_flush_mappings() |
Date: | 2014-04-23 08:11:23 |
Message-ID: | 20140423081123.GH4449@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2014-04-22 22:37:37 -0400, Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > I had to revert this patch. It causes a failure in the
> > /contrib/test_decoding regression test.
>
> On closer inspection, it was simply pfree'ing the wrong pointer.
Thanks for fixing.
> I fixed that and also undid the allocation in a different memory
> context, which didn't seem to be a particularly good idea, unless
> you've got a specific reason why CurrentMemoryContext would be the
> wrong place for a transient allocation.
That should be fine. I don't see any reason not to use palloc.
logical_rewrite_log_mapping() has to allocate longer living memory, I
guess it was copied from there.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Petr Jelinek | 2014-04-23 08:20:42 | Re: Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation) |
Previous Message | Andres Freund | 2014-04-23 08:04:28 | Re: What use case is make_tuple_indirect() supposed to illustrate? |