[PyGreSQL] Thread safety (again)

Jerome ALET Jerome.Alet at unice.fr
Sun Apr 9 09:37:25 EDT 2000


On Fri, Apr 07, 2000 at 07:11:10PM -0600, Ken Kinder wrote:
>    Ok, let me get this straight... I can have a Pygresql-using program, 
> provided that I don't have two queries running concurrently on the same 
> object?

I've personnally not tested this, either with or without my patch.

What I think is:

if you use two different database connections it should be OK, as long as 
PygreSQL is thread safe.

if you use the same database connection problems may appear, and you
have to test it, because it also depends on libpq and the postgresql
backend being thread safe.

I've only tested one thread which does queries and another which does
non database related stuff: without my patch the second thread
is blocked during each query, with my patch the second thread
continues to run and no problem appears.

bye,
Jerome




More information about the PyGreSQL mailing list