Re: transaction abort with multiple threads
Joachim Worringen <[email protected]> Thu, 20 May 2010 21:13:02 +0200
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Organization | IAT GmbH |
| Message-ID | <[email protected]> |
On 05/19/2010 01:55 PM, Joachim Worringen wrote: >> If you could run psycopg in debug mode (compiled with PSYCOPG_DEBUG in >> the setup.cfg flags and running with the PSYCOPG_DEBUG env var), the >> debug log in case of crash would be very useful. > > I can do this, maybe today. Well, I first had to fix synchronization in my code to make it really threadsafe (correct, that is) - this is now done, and guess what: this exception does not longer show up. Seems I have reduced concurrency enough to avoid it. This is of course not really satisfying, as Postgresql and psycopg should not care about whether I do stupid things with my threads or not. I'll try to go back to the original version and reproduce it. In the meantime, I observed that although two threads concurrently perform their independent operations (inserting lots of data into different temporary tables), execution does not speed up although the machine has plenty of resources available. Is it possible that I would have to use different *connections*, not only different *cursors*, to really get a speedup? Joachim