Re: message contents do not agree with length in message type "T"

From: "Mike" <mike(at)mrhost(dot)ca>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: message contents do not agree with length in message type "T"
Date: 2008-03-11 18:45:39
Message-ID: 06be01c883a8$1aa3dcb0$4feb9610$@ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks Tom,

That's definitely it- I've got a global database object that's used
throughout my application, it looks like I missed one crucial mutex lock in
the database code.

Thanks again,

Mike

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Monday, March 10, 2008 10:19 PM
To: Mike
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] message contents do not agree with length in message
type "T"

"Mike" <mike(at)mrhost(dot)ca> writes:
> I'm using the libpq interface to PostgreSQL (8.3.0) in one of our apps,
and
> I'm having a sporadic issue with receiving the error message:
> message contents do not agree with length in message type "T" server sent
> data ("D" message) without prior row description ("T" message)

The messages you're getting all mean that libpq has gotten out of sync
with the traffic that it's receiving from the server. Now you might
have discovered some fascinating new bug in either libpq or the server,
but most of the reports like this that we've seen before have been
because someone tried to use libpq in a multi-threaded application
without sufficient interlocks to keep multiple threads from using the
same PGconn concurrently. If your app has more than one thread then
please look at that closely. If not, please see if you can put together
a test case ...

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2008-03-11 18:50:29 Re: How to convert postgres timestamp to date: yyyy-mm-dd
Previous Message Kynn Jones 2008-03-11 18:35:56 Re: Trigger to run @ connection time?