Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/pgbouncer.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ unix_socket_dir = /tmp
auth_user = postgres
auth_file = /data/pgbouncer.auth

admin_users = postgres
admin_users = postgres,flypgadmin

user = postgres

Expand Down
4 changes: 2 additions & 2 deletions pkg/flypg/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,12 @@ func (n *Node) PostInit() error {

func (n *Node) NewPGBouncerConnection(ctx context.Context) (*pgx.Conn, error) {
host := net.JoinHostPort(n.PrivateIP, strconv.Itoa(n.ProxyPort))
return openConnection(ctx, host, "pgbouncer", n.OperatorCredentials)
return openConnection(ctx, host, "pgbouncer", n.SUCredentials)
}

func (n *Node) NewLocalConnection(ctx context.Context) (*pgx.Conn, error) {
host := net.JoinHostPort(n.PrivateIP, strconv.Itoa(n.PGPort))
return openConnection(ctx, host, "postgres", n.OperatorCredentials)
return openConnection(ctx, host, "postgres", n.SUCredentials)
}

func (n *Node) NewRepLocalConnection(ctx context.Context) (*pgx.Conn, error) {
Expand Down