Re: [sqlalchemy] Best way to use SERIALIZABLE READ ONLY DEFERRABLE transaction with the ORM?

2015-11-17 Thread Mike Bayer
On 11/16/2015 07:38 AM, Donald Stufft wrote: > I am currently using the SQLAlchemy ORM and I'd like to be able to start > up transactions using PostgreSQL's SERIALIZABLE READ ONLY DEFERRABLE > isolation level. I don't want every single transaction to use this > isolation level nor do I have the

Re: [sqlalchemy] Best way to use SERIALIZABLE READ ONLY DEFERRABLE transaction with the ORM?

2015-11-17 Thread Jonathan Vanasco
On Tuesday, November 17, 2015 at 9:14:51 AM UTC-5, Michael Bayer wrote: > > > conn = session.connection() > conn.detach() > conn.execute("set session isolation ") > > < work with connection> I use this strategy, but without `detatch`. I do this with SqlAlchemy in a webapp context, so I

[sqlalchemy] Best way to use SERIALIZABLE READ ONLY DEFERRABLE transaction with the ORM?

2015-11-16 Thread Donald Stufft
I am currently using the SQLAlchemy ORM and I'd like to be able to start up transactions using PostgreSQL's SERIALIZABLE READ ONLY DEFERRABLE isolation level. I don't want every single transaction to use this isolation level nor do I have the ability to change the server configuration so I need