Bruce Momjian <bruce@momjian.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