We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
According to https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS
If the host name starts with @, it is taken as a Unix-domain socket in the abstract namespace (currently supported on Linux and Windows).
However tokio-posgres connect prevents host=@... ; the error is
connect
host=@...
called Result::unwrap() on an Err value: Custom { kind: Uncategorized, error: "failed to lookup address information: Name or service not known" }
Result::unwrap()
Err
And the backtrace points to this line https://github.com/sfackler/rust-postgres/blob/02463b1/tokio-postgres/src/connect.rs#L98
The text was updated successfully, but these errors were encountered:
Note tokio doesnt support this tokio-rs/tokio#4610
I was able to workaround this using the suggestions there, ending up with
let socket = if path.display().to_string().starts_with('@') { // #[cfg(target_os = "linux")] let addr = SocketAddr::from_abstract_name(path.as_os_str().as_encoded_bytes()).unwrap(); eprintln!("Connecting to abstract Unix socket: {addr:?}"); let std_stream = std::os::unix::net::UnixStream::connect_addr(&addr).unwrap(); let stream = UnixStream::from_std(std_stream.into()); connect_with_timeout(async { stream }, connect_timeout).await.unwrap() } else { connect_with_timeout(UnixStream::connect(path), connect_timeout).await.unwrap() };
But then I get connection refused
Sorry, something went wrong.
No branches or pull requests
According to https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS
However tokio-posgres
connect
preventshost=@...
; the error isAnd the backtrace points to this line https://github.com/sfackler/rust-postgres/blob/02463b1/tokio-postgres/src/connect.rs#L98
The text was updated successfully, but these errors were encountered: