[Zope] SQL transaction uncommited?
Vlada Macek
tuttle at bbs.cvut.cz
Sat Dec 17 08:20:25 EST 2005
[At 17.12.2005 13:49, Andreas Jung kindly sent the following quotation.]
> Dealing with transaction is the task of the database adapter and not
> the ZSQL methods. If you need to deal with transactions yourself you
> must subclass the transaction manager TM and implement the hooks for
> commit and abort (see TM.py).
Yes, I looked at TM.py. I should have mentioned that I use ZPsycopgDA
and ZPsycopgDA/db.py is subclassing and using TM already. So I was
expecting the _finish() and _abort() are bound to PostgreSQL in the SQL
connection I use.
In the meanwhile I also discovered that when I put my 'insert into
testtable...' to ZSQL method, the behavior is the same -- psql does not
see new row, but the sequence is incremented. Now it's strange, isn't?
With each ZSQL method call I now found out that a new connection to the
database is keeping opened and RowExclusiveLock for testtable and
AccessShareLock for its sequence is pending. In now have tens of
connections and locks from my tryings. I may did some error in
configuration, but I have no clue where and which.
Python 2.3.5, Zope 2.7.5-final, psycopg2-2.0b6, PostgreSQL 8.1.
--
\//\/\
(Sometimes credited as 1494 F8DD 6379 4CD7 E7E3 1FC9 D750 4243 1F05 9424.)
More information about the Zope
mailing list