mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-25 16:08:25 +00:00
We need a limit on the number of PostgreSQL connections
This commit is contained in:
parent
f83ae630c1
commit
4a36cca703
@ -15,6 +15,9 @@ func init() {
|
|||||||
func postgresSetup(db *sql.DB) error {
|
func postgresSetup(db *sql.DB) error {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
db.SetMaxIdleConns(4)
|
||||||
|
db.SetMaxOpenConns(8)
|
||||||
|
|
||||||
_, err = db.Exec(`CREATE TABLE IF NOT EXISTS Devices (
|
_, err = db.Exec(`CREATE TABLE IF NOT EXISTS Devices (
|
||||||
DeviceID CHAR(63) NOT NULL PRIMARY KEY,
|
DeviceID CHAR(63) NOT NULL PRIMARY KEY,
|
||||||
Seen TIMESTAMP NOT NULL
|
Seen TIMESTAMP NOT NULL
|
||||||
|
Loading…
x
Reference in New Issue
Block a user