Skip to content

Conversation

@fantix
Copy link
Member

@fantixfantix commented Mar 22, 2021

We didn't really retry the connection without SSL if the first SSL connection fails under sslmode=prefer, that led to an issue when the server has SSL support but explicitly denies SSL connection through pg_hba.conf. This commit adds a retry in a new connection, which makes it easy to implement the sslmode=allow retry.

Fixes#716

asyncpg allow_prefer

@fantixfantixforce-pushed the t716-sslmode-allow branch from 77d4742 to c993737CompareMarch 22, 2021 03:36
@fantixfantix marked this pull request as ready for review March 22, 2021 03:45
@fantixfantix requested a review from elpransMarch 22, 2021 03:56
@fantixfantixforce-pushed the t716-sslmode-allow branch 7 times, most recently from 7ee46eb to f38aa70CompareMarch 24, 2021 02:50
We didn't really retry the connection without SSL if the first SSL connection fails under sslmode=prefer, that led to an issue when the server has SSL support but explicitly denies SSL connection through pg_hba.conf. This commit adds a retry in a new connection, which makes it easy to implement the sslmode=allow retry. FixesMagicStack#716
@fantixfantixforce-pushed the t716-sslmode-allow branch from f38aa70 to 25323fdCompareMarch 24, 2021 03:19
@fantixfantix merged commit 075114c into MagicStack:masterMar 24, 2021
@fantixfantix deleted the t716-sslmode-allow branch March 24, 2021 03:40
@elpranselprans mentioned this pull request May 17, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SSL 'prefer' option in asyncpg behaves different than libpq

2 participants

@fantix@elprans