aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--weed/filer/postgres_store/postgres_native.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/weed/filer/postgres_store/postgres_native.go b/weed/filer/postgres_store/postgres_native.go
index 47631b016..12b5015cf 100644
--- a/weed/filer/postgres_store/postgres_native.go
+++ b/weed/filer/postgres_store/postgres_native.go
@@ -94,17 +94,12 @@ func getDbConnection(conf PostgresConf) *sql.DB {
panic(pingErr)
}
- var maxIdleConnections, maxOpenConnections int
-
+ maxIdleConnections, maxOpenConnections := default_maxIdleConnections, default_maxOpenConnections
if conf.MaxIdleConnections != 0 {
maxIdleConnections = conf.MaxIdleConnections
- } else {
- maxIdleConnections = default_maxIdleConnections
}
if conf.MaxOpenConnections != 0 {
maxOpenConnections = conf.MaxOpenConnections
- } else {
- maxOpenConnections = default_maxOpenConnections
}
_db_connection.SetMaxIdleConns(maxIdleConnections)