Re: Missing pfree in logical_heap_rewrite_flush_mappings()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Ants Aasma <ants(at)cybertec(dot)at>, 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-04-23 02:37:37
Message-ID: 31701.1398220657@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sergey Konoplev 2014-04-23 02:38:35 Re: pg_upgrade and epoch
Previous Message Bruce Momjian 2014-04-23 02:25:19 Re: Missing pfree in logical_heap_rewrite_flush_mappings()