Closed lkgGitHub closed 1 year ago
When using Go, you can use the pgx driver which support multi-host and target-session-attrs since https://github.com/jackc/pgx/pull/545 3 years ago. See https://pkg.go.dev/github.com/jackc/pgx/v5#section-readme. Closing this issue, hoping that pgx indeed is an option for you.
I'll take a look at your tutorial, which uses psql to connect to the database.
I use go language to develop applications, and use xorm to connect to the database. It does not support sensing which service is the primary node.
Do pg_auto_failover have a way to database? Such as virtual ip?