You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sslmode should default to "prefer" not "disable" #654
(the associated link to the docs is broken, but I've fixed that in #653, should link to here)
But this is not correct, currently asyncpg defaults to the equivalent of sslmode=disable, e.g. it doesn't try to use SSL for the connection, while the linked postgresql.org docs says, regarding sslmode:
prefer (default) first try an SSL connection; if that fails, try a non-SSL connection
e.g. prefer is the default.
asyncpg too should default to prefer.
This caused a connection error when upgrading a heroku database from hobby tier to standard - the latter requires SSL.
From reading the source, it looks like the best work around for now will be to set the environment variable PGSSLMODE=prefer:
Activity
Prefer SSL connections by default
Prefer SSL connections by default
Prefer SSL connections by default
Prefer SSL connections by default
Prefer SSL connections by default (#660)