mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 06:43:48 +02:00
Handle retry connect to Postgres when ping return EOF error. (#2339)
* Handle retry connect to Postgres when ping return EOF error. * Update pkg/cluster/database.go Co-authored-by: Felix Kunde <felix-kunde@gmx.de> --------- Co-authored-by: Trung Minh Lai <trung.lai@hitachivantara.com> Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
This commit is contained in:
co-authored by
Felix Kunde
Trung Minh Lai
parent
ccc74ae947
commit
28c27efe43
@@ -154,7 +154,9 @@ func (c *Cluster) initDbConnWithName(dbname string) error {
|
||||
return false, err2
|
||||
}
|
||||
|
||||
return false, err
|
||||
// Retry open connection until succeeded.
|
||||
c.logger.Warningf("could not connect to Postgres database: %v", err)
|
||||
return false, nil
|
||||
})
|
||||
|
||||
if finalerr != nil {
|
||||
|
||||
Reference in New Issue
Block a user