I had a similar need under Pyramid and went with a different approach: My
"dbSession" object is actually a proxy container that holds dedicated Read,
Write, and Log SqlAlchemy sessions. I explicitly address
"dbSession.reader" or "dbSession.writer" in all code.
Everything that is "public
On Thu, Dec 15, 2016 at 10:00 AM, Simon King wrote:
> On Thu, Dec 15, 2016 at 2:07 AM, Matt wrote:
>>
>>
>> On Wednesday, December 14, 2016 at 3:58:19 PM UTC+1, Mike Bayer wrote:
>>>
>>>
>>> When you want to switch between "writer" and "reader", the
On Thu, Dec 15, 2016 at 2:07 AM, Matt wrote:
>
>
> On Wednesday, December 14, 2016 at 3:58:19 PM UTC+1, Mike Bayer wrote:
>>
>>
>> When you want to switch between "writer" and "reader", the "reader" must
>> be fine with using a totally clean transaction and that means totally
>>
On Wednesday, December 14, 2016 at 3:58:19 PM UTC+1, Mike Bayer wrote:
>
>
> When you want to switch between "writer" and "reader", the "reader" must
> be fine with using a totally clean transaction and that means totally
> new objects and everything inside that Session as well. For a web
>
I am currently writing a Flask web application that uses Flask-SQLAlchemy
to communicate with a Postgres database. I want to have several
read-replicas to which all database read queries can be directed, while all
read+write queries can go to the master database instance. In other words,
a