Re: [sqlalchemy] Re: Multi-AZ RDS on AWS, failover and SQLAlchemy

2015-12-21 Thread Joshua Ma
Hi Jonas, Just wondering if you were able to characterize the behavior and had any ideas for gracefully handling RDS failover. From what I'm seeing, RDS will not cause errors, but will simply hang, so SQLA doesn't hit its "optimistic disconnect handling"

[sqlalchemy] Re: Connection pools

2015-12-21 Thread Jonathan Vanasco
The sizes for the connection pool are for each instance of your application. If you have a 10connection pool and you are running 10 instances of your application on the server, you'll easily have 100 connections. If you're running 1 instance that forks, each fork will have it's own pool (if

[sqlalchemy] Re: Connection pools

2015-12-21 Thread Chris Wood
Ah, ok - thanks for the explanation - this is different to how I'd been led to believe it worked! However, I know that even when I'm the only person testing the application, I'm still getting a large number of connections. Is there a likely explanation why? On Monday, 21 December 2015 18:51:25

[sqlalchemy] Connection pools

2015-12-21 Thread Chris Wood
Hello all, I've inherited a fairly large / complex internal web-based data portal (with a distinct lack of documentation), which is causing some fairly major headaches. The application was originally written with a SQLite backend, but I was asked to convert this to Oracle, which I've done.

[sqlalchemy] Re: column_property with load_only and inheritance

2015-12-21 Thread Mattias Lagergren
Hi again, I thought I should reply and update on what the issue was. It might be possible that __declare_last__() isn't appropriate here, can > you try just saying "Context.link = column_property()"... right after > you declare Context? > This was a good advice and ultimately led me to the

Re: [sqlalchemy] Re: Connection pools

2015-12-21 Thread Mike Bayer
On 12/21/2015 07:44 PM, Chris Wood wrote: > Ah, ok - thanks for the explanation - this is different to how I'd been > led to believe it worked! However, I know that even when I'm the only > person testing the application, I'm still getting a large number of > connections. Is there a likely

Re: [sqlalchemy] Combined column_expression + process_result_value for custom/decorated type not working?

2015-12-21 Thread Mike Bayer
On 12/21/2015 08:06 AM, Bernardo wrote: > Hi, > > I'm trying to use a custom BYTEA-based type on PostgreSQL (9.2) on > SQLAlchemy 1.0.9., e.g. > > | > class MySpecialBytea(types.TypeDecorator): > impl = BYTEA > > def process_result_value(self, value, dialect): > print

Re: [sqlalchemy] Combined column_expression + process_result_value for custom/decorated type not working?

2015-12-21 Thread Bernardo
Aha, that did the trick! Somehow I'd missed that requirement of specifying the type... Anyway, thanks a lot for the quick reply! :) On Monday, 21 December 2015 16:48:03 UTC, Michael Bayer wrote: > > > > try having the SQL expression itself also be of type MySpecialByteA: > > return