Skip to content

Commit 0eaf5ba

Browse files
committed
Merge branch '196-dynamic-port-with-idleness' into 'v2.0'
fix: use an actual PostgreSQL port to check idleness of clones (#196) See merge request postgres-ai/database-lab!201
2 parents e86904c + 895b51b commit 0eaf5ba

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/services/cloning/mode_base.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,9 +585,8 @@ func hasNotQueryActivity(session *resources.Session) (bool, error) {
585585
return checkActiveQueryNotExists(db)
586586
}
587587

588-
// TODO(akartasov): Move the function to the provision service.
589588
func getSocketConnStr(session *resources.Session) string {
590-
return fmt.Sprintf("host=%s user=%s dbname=postgres", session.SocketHost, session.User)
589+
return fmt.Sprintf("host=%s user=%s port=%d dbname=%s", session.SocketHost, session.User, session.Port, defaultDatabaseName)
591590
}
592591

593592
// checkActiveQueryNotExists runs query to check a user activity.

0 commit comments

Comments
 (0)