Re: ECPG thread-safety - Mailing list pgsql-interfaces

From Philip Yarra
Subject Re: ECPG thread-safety
Date
Msg-id 200304241017.15309.philip@utiba.com
Whole thread Raw
In response to ECPG thread-safety  (Lee Kindness <lkindness@csl.co.uk>)
List pgsql-interfaces
On Wed, 23 Apr 2003 18:47, Lee Kindness wrote:
> 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.

Oh yes, I figured that. Each thread in this application opens its own
connection, so this ought not to be the issue. Each DB insert actually gets
the data into the table, but 2 of the 3 threads stop after that... possibly
due to concurrently accessing sections of the sqlca struct? (that's just a
guess though)

Our code is a bit tricky to get running - I might see if I can create a simple
test harness to duplicate the problem and post it to you.

Regards, Philip.



pgsql-interfaces by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] First draft of new FE/BE protocol spec posted for comments
Next
From: Philip Yarra
Date:
Subject: Re: ECPG thread-safety