[Zope-DB] Re: Trying to catching ZPsycopg exceptions aborts the transaction

Josef Meile jmeile at hotmail.com
Tue Nov 30 07:43:08 EST 2004

Hi Federico,

> don't even go on. :) psycopg will never support that because it will
> stand against zope transactional machinery.
Yes, I know. I'm not requesting it ;-). I'm just wondering how other
people solved the problem.

> to be exact we pointed you at managing your own psycopg connection in an
> external method or in your own product instead of using ZpsycopgDA.
Yes, I received more suggestions there, but finally the thread turns to
be out topic on the list. I tried what you said from the python command 
line and I didn't like the results. As I said previously, it generates 
new separated transactions, so, there is no way to rollback the
transaction if the server crashes.

Just if somebody is interested on the thread:

How to force the transaction to commit with ZPsycopgDA

> anyway I am curious about what other people have to say on your specific
> problem. I myself would have used a single row for every reservation,
> iterating over smaller and smaller time ranges until the right one is
> found.
But it wouldn't be efficient in time and the race condition is still
there. Two users may get the same free ranges.

Thanks anyway,

More information about the Zope-DB mailing list