Skip to content

Commit

Permalink
Remove extra debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyklyukin committed Oct 18, 2017
1 parent 33191a2 commit d80fc64
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pkg/cluster/pg.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (c *Cluster) pgConnectionString() string {
fmt.Sprintf("%s.%s.svc.cluster.local", c.Name, c.Namespace),
c.systemUsers[constants.SuperuserKeyName].Name,
strings.Replace(password, "$", "\\$", -1),
constants.PostgresConnectTimeout / time.Second)
constants.PostgresConnectTimeout/time.Second)
}

func (c *Cluster) databaseAccessDisabled() bool {
Expand All @@ -55,18 +55,13 @@ func (c *Cluster) initDbConn() error {

var conn *sql.DB
connstring := c.pgConnectionString()
c.logger.Debugf("establishing new database connection to %q", connstring)

finalerr := retryutil.Retry(constants.PostgresConnectTimeout, constants.PostgresConnectRetryTimeout,
func() (bool, error) {
var err error
conn, err = sql.Open("postgres", connstring)
if err == nil {
c.logger.Debugf("connection established", connstring)
err = conn.Ping()
if err == nil {
c.logger.Debugf("ping sucessful", connstring)
}
}

if err == nil {
Expand Down

0 comments on commit d80fc64

Please sign in to comment.