Re: Advice on debugging what seems a deadlock with Zope and psycopg
Federico Di Gregorio <fog-NGVKUo/i/[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Organization | initd.org |
| Message-ID | <[email protected]> |
Il giorno dom, 03/08/2008 alle 12.56 +0200, Marco Bizzarri ha scritto: > On Sun, Aug 3, 2008 at 11:16 AM, Federico Di Gregorio <fog-NGVKUo/i/[email protected]> wrote: > > Hi Marco, > > > > if I remember correctly, SELECT FOR UPDATE place a lock on the selected > > rows so this _can_ be a deadlock problem. > > Yes, SELECT FOR UPDATE do places a lock on the rows. In my testcase, > I'm basically performing over and over (using ab) the same sequence of > operations; they are, more or less: > > SELECT FOR UPDATE to get the value of the counter > UPDATE to increase the counter > > even though there are other tables involved they should not be > involved in this kind of problem. > > And, transaction isolation level is SERIALIZABLE. > > > At first sight it does not > > seem a psycopg problem but the version you're using is so old I don't > > remember if there were locking bugs. > > Yes, I know; the version of psycopg is quite old, and I'm considering > a migration path; the problem is that I've to consider a migration > path for psycopg, python, Zope and PostgreSQL (altough, admitedly, > this one seems the less probelmatic to me). > > > Which version of PostgreSQL are you > > using? > > 7.4.13 (on a debian etch, if it is useful). Mm.. you're using software that is unmaintained by ages. ;) Anyway the only thing I can think of is lowering the transaction isolation level and/or temporarily remove the FOR UPDATE and check what happens. If everything goes well then it is PostgreSQL bug or a bug in your application. federico -- Federico Di Gregorio http://people.initd.org/fog Debian GNU/Linux Developer [email protected] INIT.D Developer fog-NGVKUo/i/[email protected] Abandon the search for Truth; settle for a good fantasy. -- Anonymous _______________________________________________ Psycopg mailing list Psycopg-IAPFreCvJWPBWskQ1e/[email protected] http://lists.initd.org/mailman/listinfo/psycopg
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkiV8gsACgkQvcCgrgZGjetUCACfSRB4dlV6+ZD0Wfda44RYiR4P LRsAnRlHELKMkqAx9tJ15YKjp4UOEZ9i =EdxF -----END PGP SIGNATURE-----