"J. R. Fisher" <psql(at)jeffryfisher(dot)net> writes:
> *** glibc detected *** free(): invalid next size (normal): 0x08068ab0
Sounds like a memory clobber. The odds are extremely high that the
clobber is in your own code, not libpq. If nothing else comes to mind,
you could probably use ElectricFence or some other debugging-malloc
package to help find the problem.
regards, tom lane