ayi_zhou(at)aliyun(dot)com writes:
> Here is the core dump information:
This looks like something has clobbered malloc's internal data structures.
I'm skeptical that it was libpq itself that did so, though. I'd suggest
running your program under valgrind or a similar tool to try to find the
cause.
regards, tom lane