On Tue, Aug 10, 1999 at 09:07:10AM -0400, Jim Fulton wrote:
Theodore Patrick wrote:
ZOPE 1.10.3
I have two separate database connections to an oracle database. The connections are in separate folders and are attached to the same ORACLE database.
Are there any hidden do's and don'ts for multiple database connections?
The transaction machinery in Oracle, or any database that supports transactions can lead to a deadlock situation if you have multiple connections to the same database. For example, suppose you have
<snipped Jim's cogent description of DB table lock contention> I'd just like to point out the 'or any database that supports transactions' isn't strictly true. The latest version of PostgreSQL (6.5) implements something called multi-version coherence control, or MVCC. In the situation Jim described (transaction T1 writing to a table, another (T2) reading from it) there's no locks used at all: all readers see the table in it's pre-T1 state, until T1 commits, or rolls back. Two transactions can even write to the same table, as long as they don't write the same row. Hmm, this sounds a bit like Zope Versions (er Sessions?), doesn't it? One practical benefit from this is live db backups: since the dump runs in a transaction, it gets a consistent snapshot of the db. Gee, I better check on how work is going on the ZPyGreSQLDA, hmm? (I've got some people helping me, btw) Ross -- Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu> NSBRI Research Scientist/Programmer Computer and Information Technology Institute Rice University, 6100 S. Main St., Houston, TX 77005