-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
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
Driver unable to connect to CockroachDB #424
Comments
Thank you for testing with CockroachDB! This is occurring because pgjdbc-ng is assuming that Here's the offending method in
CRDB does not currently support In the meantime, I think a fix for this issue would be to not require |
If I remember correctly, |
Some databases, such as CockroachDB, do not send BackendKeyData on connection initialization. Previously, the ServerConnectionFactory would assume that BackendKeyData would always be present which caused a NullPointerException. Now, the BackendKeyData defaults to 0 instead of null.
Yeah, it is just for cancelling requests. (CockroachDB has a non-pg-compatible cancel query statement.) I'm happy to add the check-and-logs, though without a check, I believe all that will happen is the cancel query would be rejected. |
Some databases, such as CockroachDB, do not send BackendKeyData on connection initialization. Previously, the ServerConnectionFactory would assume that BackendKeyData would always be present which caused a NullPointerException. Now, the BackendKeyData defaults to 0 instead of null.
Some databases, such as CockroachDB, do not send BackendKeyData on connection initialization. Previously, the ServerConnectionFactory would assume that BackendKeyData would always be present which caused a NullPointerException. Now, the BackendKeyData defaults to 0 instead of null. If the BackendKeyData is not set, then the CancelRequestTask short-circuits and logs a warning.
Some databases, such as CockroachDB, do not send BackendKeyData on connection initialization. Previously, the ServerConnectionFactory would assume that BackendKeyData would always be present which caused a NullPointerException. Now, the BackendKeyData defaults to 0 instead of null. If the BackendKeyData is not set, then the CancelRequestTask short-circuits and logs a warning.
Yes, this issue is resolved with that change. I confirmed that my local repro case works now. |
Looks like something isn't compatible, either cockroachdb or this library.
Following this tutorial:
https://www.cockroachlabs.com/docs/v19.1/build-a-java-app-with-cockroachdb.html#insecure
DataSource snip (
PGDataSource
):Stack trace:
The text was updated successfully, but these errors were encountered: