sfackler / rust-postgres

Native PostgreSQL driver for the Rust programming language
Apache License 2.0
3.43k stars 436 forks source link

tokio-postgres - hangs opening a connection when host is tailscale DNS #1056

Closed sdedovic closed 1 year ago

sdedovic commented 1 year ago

I am trying to connect to a database over my VPN. I use tailscale and have magic DNS enabled. I notice the following:

I have not done much investigation, yet. It is also worth noting that using the magic DNS works for JDBC and other DB connectors.

sfackler commented 1 year ago

The library just uses getaddrinfo for DNS resolution.

sdedovic commented 1 year ago

After some more investigation, I believe this is an issue with the Nix package manager and MacOS.

I have not confirmed the issue exists when using a system-wide rustup installed version of rust but that is my next step.