"Jeffrey Baker" <jwbaker@gmail.com> writes:
> The stack trace doesn't actually make sense, does it? I think that
> (at least) the PQmblen frame is spurious.
Yeah, it's obviously lying to some extent. I think you need a copy
of libpq with debug symbols enabled to get a more accurate trace.
regards, tom lane