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

From Tomas Berndtsson
Subject Re: big text field -> message type 0x44
Date
Msg-id 80ptsgbflx.fsf@junk.nocrew.org
Whole thread Raw
In response to Re: big text field -> message type 0x44  (Lee Kindness <lkindness@csl.co.uk>)
List pgsql-hackers
Lee Kindness <lkindness@csl.co.uk> writes:

> Tom Lane writes:
>  > 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?
> 
> However, _REENTRANT is not a Solarisism... On all (recent) UNIX
> systems it toggles on correct handling for thread specific instances
> of historically global variables (eg errno). It should be considered
> for all platforms if libpq is intended to be used from threaded
> programs.
> 
> You'll probably find Tomas's code breaks on Linux too...

Actually, I've tried it in Linux, and it works there. Might be that
the recv() doesn't return -1 when trying again in Linux. In that case,
for this particular problem, it wouldn't matter if it's reentrant or
not.


Tomas


pgsql-hackers by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: 7.4 - TODO : alter table drop foreign key
Next
From: Tomas Berndtsson
Date:
Subject: Re: big text field -> message type 0x44