Skip to content
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

Add support for the sslnegotiation DSN option #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

analytically
Copy link

No description provided.

Signed-off-by: Mathias Bogaert <mathias.bogaert@gmail.com>
@analytically
Copy link
Author

Hi @taylorsilva, please review, this adds support for the sslnegotiation parameter. A new parameter in Postgres 17 allows for direct TLS handshakes, reducing network latency and improving the performance of secure connections​.

analytically referenced this pull request in concourse/concourse-chart Oct 21, 2024
Signed-off-by: Taylor Silva <dev@taydev.net>
@taylorsilva taylorsilva mentioned this pull request Oct 21, 2024
27 tasks
Copy link
Member

@taylorsilva taylorsilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, the tests pass. Only thing I'm not sure about is if this requires lib/pq to support this feature? I don't know enough about what limits the driver places on us in regards to version specific features like this.

Seeing issues like this one in the lib/pq project makes me think this won't do anything 🙁
lib/pq#1175

@taylorsilva
Copy link
Member

Yeah looking at https://github.com/lib/pq/blob/master/ssl.go
I think the driver needs to be updated. But based on the project's README it doesn't look like they'll be adding this feature any time soon. Someone smarter than me let me know if I'm reading this all wrong though 🙏

@conradludgate
Copy link

Adding this feature to lib/pq should just be a case of adding an if statement around https://github.com/lib/pq/blob/3d613208bca2e74f2a20e04126ed30bcb5c4cc27/conn.go#L1116-L1130. Indeed a question whether the maintainers will respond to such a patch, however. I'll open one

@taylorsilva
Copy link
Member

That stack of PR's they have is not promising
image

This is making me think we should investigate other Postgresl Go drivers...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants