Skip to content

Support sslnegotiation=direct for Postgres 17 users #1347

@globalchubby

Description

@globalchubby

Postgres 17 supports direct SSL negotiation with sslnegotiation=direct. pgx supports this, for example via PGSSLNEGOTIATION=direct or by sslnegotiation=direct in the DB connection URL, but it's not supported here.

Currently I'm running a Kubernetes Job that uses golang-migrate to run migrations. This Job talks to an RDS instance where traffic goes through an egress gateway, who's service entry requires TLS on port 5432. Without direct SSL negotiation, the initial SSL negotiation packets are sent over plaintext, causing the gateway to reject traffic from the Job's pod.

A solution is to create the connection manually and pass the connection to the golang-migrate binaries, but this requires maintaining my own wrapper binary, workflows to build and push it, etc. I'd rather just have golang-migrate support direct SSL and use this binary in my Job directly without maintaining a wrapper.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions