Re: big text field -> message type 0x44 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: big text field -> message type 0x44
Date
Msg-id 18432.1039036638@sss.pgh.pa.us
Whole thread Raw
In response to Re: big text field -> message type 0x44  (Tomas Berndtsson <tomas@nocrew.org>)
Responses Re: big text field -> message type 0x44
List pgsql-hackers
Tomas Berndtsson <tomas@nocrew.org> writes:
> However, after some semi-random looking through the source code of
> libpq, I tried to change a value, namely here:
> fe-misc.c row 510 in pqReadData():
>                 if (conn->inEnd > 32768 &&
>                         (conn->inBufSize - conn->inEnd) >= 8192)

> I changed the 32768 value to 131072, and sure enough, my application
> was able to get larger fields without any errors.

That's really interesting.  I cannot see anything unsafe about that
retry loop --- could you instrument it some more to determine exactly
what happens after we go back to try to read more?

Also, are you using SSL by any chance?  Perhaps the problem is that
the SSL library doesn't react the same as a bare recv() call?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: postgres core FALSE ALARM
Next
From: Patrick Welche
Date:
Subject: 24:00:00 ?