@Jonathan Vanasco:
i have no input on the issues michael identified.
but i'm curious about a sqlalchemy event somehow not firing. which
transaction event were you using? after_begin or after_transaction_create
?
I used the after_begin event to set the search_path, but moved it into the
Ok, i found the issue!
When I tried to use pg8000 to connect to postgres i got an error: cannot
insert multiple commands into a prepared statement.
Apparently multiple queries is fine with psycopg2, but not using pg8000.
We prefix all queries because of a workaround. We handle multi-tenancy
set the search path within the connection pool using the “connect” event;
all connections used by the pool will then have this search path setting
the moment they connect. Don’t ever put multiple SQL expressions in a DBAPI
execute (for this very reason - driver changes, hilarity ensues. We are
Hi Jonathan,
Thanks for your response, i removed the newresponse event like you
mentioned and added a finished callback to the request (in a tween):
request.add_finished_callback(cleanup_db_session)
Unfortunatly the plot thickens! Since the last time i tested our project,
the problem
this problem?
Thanks in advance!
Matthijs Blaas
PS: sorry for the crosspost
(http://stackoverflow.com/questions/25768428/sqlalchemy-connection-errors),
i hope i might catch some experts here that otherwise wouldn't see the
stackoverflow post
--
You received this message because you are subscribed