Skip to content

Commit

Permalink
fix: always use session mode when connecting to pooler (#2081)
Browse files Browse the repository at this point in the history
  • Loading branch information
sweatybridge authored Mar 22, 2024
1 parent b340552 commit 034017b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions internal/utils/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,7 @@ func GetPoolerConfig(projectRef string) *pgconn.Config {
}
fmt.Fprintln(logger, "Using connection pooler:", poolerUrl)
// Supavisor transaction mode does not support prepared statement
if poolerConfig.Port == 6543 {
if _, ok := poolerConfig.RuntimeParams["statement_cache_mode"]; !ok {
poolerConfig.RuntimeParams["statement_cache_mode"] = "describe"
}
}
poolerConfig.Port = 5432
return poolerConfig
}

Expand Down

0 comments on commit 034017b

Please sign in to comment.