Skip to content

RedShift doesn't support ssl_renegotiation_limit #321

@jacobmarble

Description

@jacobmarble

(Originally mentioned in #282)

pgx can't connect to a RedShift cluster when the cluster is configured to require SSL. The patch below illustrates a workaround, not a fix; there should be a more thoughtful way to approach this problem.

As RedShift inevitably continues to diverge from Postgres, it might make sense to add a new query parameter to the data source name parser. For example, redshift=true. This could be translated to a boolean field of the ConnConfig struct, made available for future RedShift-specific workarounds. If that sounds like a good idea, I'll be happy to write a PR.

RedShift have so far not committed to a fix, but at least someone there is aware of the problem.
https://forums.aws.amazon.com/thread.jspa?threadID=229990

$ git diff
diff --git a/conn.go b/conn.go
index f549e03..d0b4f4b 100644
--- a/conn.go
+++ b/conn.go
@@ -321,7 +321,7 @@ func (c *Conn) connect(config ConnConfig, network, address string, tlsConfig *tl
        // Go does not support (https://github.com/golang/go/issues/5742)
        // PostgreSQL recommends disabling (http://www.postgresql.org/docs/9.4/static/runtime-config-connection.html#GUC-SSL-RENEGOTIATION-LIMIT)
        if tlsConfig != nil {
-               startupMsg.Parameters["ssl_renegotiation_limit"] = "0"
+               //startupMsg.Parameters["ssl_renegotiation_limit"] = "0"
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions