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 27726.1039101967@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
Re: big text field -> message type 0x44
List pgsql-hackers
Tomas Berndtsson <tomas@nocrew.org> writes:
> Indeed you were right in this. But, if I added -D_REENTRANT to the
> Makefile for libpq, it started to set it. If libpq should be thread
> safe, I believe it should be compiled with -D_REENTRANT. 

> When I did this, recv still returns error, but now sets errno to
> EAGAIN, so pqReadData() returns 1, giving the same result as removing
> the if-statement that does the try again thing. 

Okay, so it seems -D_REENTRANT is the appropriate fix.

We could either add that to the template/solaris file, or just add a
note to FAQ_Solaris advising that it be added to the configure switches
if people intend to use libpq in threaded programs.  Is there any
cost or downside to just adding it always in template/solaris?
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Dan Langille"
Date:
Subject: 7.4 - TODO : IpcSemaphoreCreate: No space left on device
Next
From: Tomas Berndtsson
Date:
Subject: Re: big text field -> message type 0x44