[Zope-dev] Re: your mail
Federico Di Gregorio
fog@mixadlive.com
Mon, 9 Apr 2001 10:22:30 +0200
Scavenging the mail folder uncovered Randall F. Kern's letter:
[snip]
> Concurrent updates are not supported in the serializable transaction
> mode; if one transaction tries to update (or delete) a row that has
> already been updated by a concurrent uncommitted transaction, the second
> transaction will fail with a "concurrent update" error.
mmm... are they supported in the read commited mode? if yes it will be
easy to add this mode as on option to psycopg cursors and use it in zope.
do you know how much faster would it be compared to the serialized mode?
> Given that the default transaction mode for these DAs is Serializable,
> and Zope has this nifty support for ConflictErrors and retrying
> transactions already, I propose Postgres DAs should convert the
> concurrent update serialization errors into ConflictErrors
> automatically.
>
> I've been running this way for a few days, and everything seems great.
> Any reasons why this might be good/bad/ugly very welcome. (Like: is it
> safe to throw a ConflictError at any random time during processing?
> >From a quick glance at ZODB it seems they are only thrown at commit time
> now)
>
> Here is a small patch to ZPsyccopgDA 0.5.1 that implements this change:
thank you very much for the patch. i am waiting to know what others think
about it (i am not a ZODB expert) before we incorporate it.
ciao,
federico
--
Federico Di Gregorio
MIXAD LIVE Chief of Research & Technology fog@mixadlive.com
Debian GNU/Linux Developer & Italian Press Contact fog@debian.org
Don't dream it. Be it. -- Dr. Frank'n'further