pgx icon indicating copy to clipboard operation
pgx copied to clipboard

HA URL connection strings will break in Go 1.26

Open jackc opened this issue 3 months ago • 0 comments

url.Parse will no longer accept PostgreSQL URLs with multiple host:ports in Go 1.26. Previously, parsing postgres://jack:secret@foo:1,bar:2,baz:3/mydb?sslmode=disable worked. "foo:1,bar:2,baz:3" was parsed as Host and pgx could split on ,.

https://github.com/golang/go/commit/e3be2d1b2b68d960398a343805f77052d5decb22 breaks this behavior. There are no plans to restore this behavior: https://github.com/golang/go/issues/75859#issuecomment-3393679437.

jackc avatar Oct 11 '25 22:10 jackc