Describe the bug
The redshift patch of psycopg2 connect and/or sqlalchemy create_engine is unconditional, and therefore will modify a call to those functions for engines which are not the one we're trying to connect to.
I.e. if you create 2 fixtures, a postgres one and a redshift one and attempt to use them both in the same test.
Possible solution: Conditionally apply the patch based on the DSN of the call. Ideally on as many fields as we can to stay frugal on the patch. like certainly drivername/host/port and maybe database
Describe the bug The redshift patch of psycopg2 connect and/or sqlalchemy create_engine is unconditional, and therefore will modify a call to those functions for engines which are not the one we're trying to connect to.
I.e. if you create 2 fixtures, a postgres one and a redshift one and attempt to use them both in the same test.
Possible solution: Conditionally apply the patch based on the DSN of the call. Ideally on as many fields as we can to stay frugal on the patch. like certainly drivername/host/port and maybe database