-
Notifications
You must be signed in to change notification settings - Fork 296
Open
Labels
Description
Elixir version
1.18.1
Database and Version
17
Postgrex Version
0.19.0
Current behavior
Specifying the start_link connection options as:
endpoints: [
{hostname, port, socket_options: [:inet6]},
{hostname, port, socket_options: [:inet]}
]Results in a warning
[warning] Returning a triplet from :endpoints is deprecated, the server name indicator is automatically set based on the hostname if SSL is enabled
And the options are not respected - and looking at the source they seem to be completely discarded:
postgrex/lib/postgrex/protocol.ex
Lines 192 to 196 in 34a57fe
| {hostname, port, _extra_opts} -> | |
| Logger.warning( | |
| "Returning a triplet from :endpoints is deprecated, " <> | |
| "the server name indicator is automatically set based on the hostname if SSL is enabled" | |
| ) |
Expected behavior
We want to be able to fallback from IPv6 to IPv4, and potentially also try different SSL options, and the endpoints option is currently documented to accept extra options.
If the library had the documented behaviour it would be very convenient for implementing fallbacks in configuration options - is the lack of support of options per endpoint an intentional decision, and would it potentially be reinstated?