| From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
|---|---|
| To: | Adam <adam(dot)ciazynski(at)gmail(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: ECPG and multiple threads |
| Date: | 2006-11-10 14:19:04 |
| Message-ID: | 20061110141904.GA17052@svana.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Fri, Nov 10, 2006 at 12:23:19AM -0800, Adam wrote:
> Hi,
>
> I'm porting an embedded-SQL application to PostgreSQL so embedded sql
> is a must for me. My application is multi-threaded. SQL queries are
> used by several threads. The program keeps terminating unexpectedly in
> deemingly "innocent" places.
Note, you might be able to make ECPG and libpq thread-safe, however
even then you *cannot* use the same connection simultaneously from
different threads. You will have to open a new connection for each
parallel connection you want to handle. Or use locking.
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2006-11-10 14:24:29 | Re: AutoVacuum on demand? |
| Previous Message | Teodor Sigaev | 2006-11-10 14:15:48 | Re: tsearch2() with data from other table |