Currently there is no flags or options that allow control over the connection parameters Postgres database.
This issue is to add support for connection parameters when passed via the DB url.
Example:
postgresql://user:pass@host/db?connect_timeout=300&keepalives=1&keepalives_idle=60&keepalives_interval=10&keepalives_count=10
This can be useful for certain cloud environments notably serverless and cloud edge use cases.