Robert Haas <robertmhaas(at)gmail(dot)com> writes:> Revised patch attached.
The asserts in AtProcExit_LocalBuffers are a bit pointless sinceyou forgot to remove the code that forcibly zeroes LocalRefCount[]...otherwise +1.
regards, tom lane