From: | Lee Kindness <lkindness(at)csl(dot)co(dot)uk> |
---|---|
To: | Philip Yarra <philip(at)utiba(dot)com> |
Cc: | Lee Kindness <lkindness(at)csl(dot)co(dot)uk>, Michael Meskes <meskes(at)postgresql(dot)org>, pgsql-interfaces(at)postgresql(dot)org |
Subject: | ECPG thread-safety |
Date: | 2003-04-23 08:47:06 |
Message-ID: | 16038.21258.950904.455466@kelvin.csl.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-interfaces pgsql-patches |
Philip Yarra writes:
> I've had a few tries at testing the ECPG threadsafe patch, but so
> far no luck, probably due to my own lack of experience. Can someone
> help me out with how to test this?
>
> So far I have:
> - run configure
> - applied Lee's patch to the source tree for 7.3.2
> - edited src/Makefile.global, adding -pthread to CFLAGS and and
> -lpthread to LIBS
> - make and make install
> - make our own pthread'd app, linking against newly installed pgsql
> Then when I run our app with 3 DB threads, I can watch 2 of the threads fai=
> l=20
> to return from EXEC SQL, which is exactly the same behaviour we used to get.
>
> Can anyone point me in the right direction? I'm building on RedHat Linux 7.=
> 3=20
> on Intel, using all standard tools for that version (except updated bison=
> =20
> from 1.35 to 1.875). So gcc 2.96, gmake 3.79.1, etc. Let me know if more=20
> details are required.
Even with this patch you'll still be limited by the underlying
libpq. So for example you cannot share a connection between threads
without implementing locking to prevent multiple access to that
connection.
I guess the best way would be to open a named connection for EACH
thread. This SHOULD work, but again not tested...
L.
From | Date | Subject | |
---|---|---|---|
Next Message | Philip Warner | 2003-04-23 10:49:25 | Re: bit strings - anyone working on them? |
Previous Message | D'Arcy J.M. Cain | 2003-04-23 08:37:02 | Re: For the ametures. (related to "Are we losing momentum?") |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2003-04-23 14:23:15 | Re: FE/BE Protocol 3.0 Draft - Some Comments |
Previous Message | Rudy Lippan | 2003-04-23 03:18:42 | Re: DBD::Pg large processor load. |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2003-04-23 18:15:59 | Re: ECPG thread-safety |
Previous Message | Christopher Kings-Lynne | 2003-04-23 03:46:05 | Re: log_min_duration_statement #2 |