The following statement_timeout option works on some Postgresql databases, and on others Unsupported startup parameter: options. Why?
Perhaps this is the difference between Postgres 9.4 and 9.6? This works with previous servers and does not work with the latter.
from sqlalchemy import create_engine
db_engine = create_engine("postgresql://user:pw@host/database",
connect_args={"options": "-c statement_timeout=1000"})
with db_engine.connect() as db_connection:
print("got it")
In particular, I get:
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) ERROR: Unsupported startup parameter: options
source
share