[Twisted-web] Twisted and SQLAlchemy Cache Problem

Manlio Perillo manlio_perillo at libero.it
Wed Jun 13 09:08:01 EDT 2007


Magnus Hult ha scritto:
> Hi,
> 
> When executing the following program, changes in the database (other
> than those made by this program) aren't visible until it is restarted,
> due to some form of SQLAlchemy caching:
> 

Are you using PostgreSQL?

If this is the case, then give a look at:
http://initd.org/tracker/psycopg/wiki/psycopg2_documentation#setting-transaction-isolation-levels

psycopg1 has a SERIALIZED default isolation level, psycopg2 has a READ 
COMMITED default isolation level.

The solution is: make sure to add a commit after every select.

You can read a discussion with the psycopg author in the 
it.comp.lang.python newsgroup:
http://groups.google.com/group/it.comp.lang.python/browse_thread/thread/bf98fd21e78958e4

 > [...]


Regards  Manlio Perillo



More information about the Twisted-web mailing list