Re: PQtrace doesn't work

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Daniel Verite <daniel(at)manitou-mail(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PQtrace doesn't work
Date: 2005-09-23 17:31:47
Message-ID: 200509231731.j8NHVl510904@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Daniel Verite wrote:
> Bruce Momjian wrote:
>
> > Looking at the code, the only thing I see done by PQtrace are some calls
> > to fprintf to that file descriptor, like this:
> >
> > fe-misc.c: fprintf(conn->Pfdebug, libpq_gettext("To backend> Msg %c\n"),
> >
> > Hard to imagine what would fail there, unless libpq_gettext() doesn't
> > work, but you are probably not use NLS, so it would be a noop:
> >
> > #define libpq_gettext(x) (x)
> >
> > Can you send us a backtrace of the failure from VC++? We don't have too
> > many internals guys using that setup, but the backtrace should suggest a
> > cause.
>
> Having a similar setup, I've tried enabling PQtrace and it also crashes
> for me, apparently as soon as libpq tries to write into the stream.
>
> In the hope of debugging at the point of the fprintf call,
> I've built a libpq.lib to link with, as opposed to libpqdll.lib,
> but the statically-linked version doesn't crash, it works as
> expected.
>
> So it looks like the problem would be DLL-related?

Is there a problem with a DLL writing to a file descriptor opened by
application code? I would think not, but perhaps.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2005-09-23 17:53:14 Re: [GENERAL] 8.1 observation
Previous Message Guy Fraser 2005-09-23 17:29:36 Re: array_dims array_lower/upper distance