From: | Tomas Berndtsson <tomas(at)nocrew(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: big text field -> message type 0x44 |
Date: | 2002-12-05 15:38:49 |
Message-ID: | 80u1hsbhme.fsf@junk.nocrew.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> Tomas Berndtsson <tomas(at)nocrew(dot)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?
Not that I know of. Some data (like errno) is made local for the
thread, so I suppose it takes a little more memory and maybe more disk
space, but else than that I don't think it affects much. But, then
again, I'm not an expert at these things. Someone else might know
more what the real difference is.
Tomas
From | Date | Subject | |
---|---|---|---|
Next Message | Lee Kindness | 2002-12-05 15:44:22 | Re: big text field -> message type 0x44 |
Previous Message | Tom Lane | 2002-12-05 15:26:07 | Re: big text field -> message type 0x44 |