multi: add global log for wallet db postgres back
This commit is contained in:
7 files changed
+70
-4
No files matched your search
@@ -9,4 +9,5 @@ type Config struct {
|
||||
Dsn string `long:"dsn" description:"Database connection string."`
|
||||
Timeout time.Duration `long:"timeout" description:"Database connection timeout. Set to zero to disable."`
|
||||
MaxConnections int `long:"maxconnections" description:"The maximum number of open connections to the database. Set to zero for unlimited."`
|
||||
WithGlobalLock bool `long:"withgloballock" description:"Use a global lock to ensure a single writer."`
|
||||
}
|
||||
@@ -28,6 +28,7 @@ func newPostgresBackend(ctx context.Context, config *Config, prefix string) (
|
||||
Schema: "public",
|
||||
TableNamePrefix: prefix,
|
||||
SQLiteCmdReplacements: sqliteCmdReplacements,
|
||||
WithTxLevelLock: config.WithGlobalLock,
|
||||
}
|
||||
|
||||
return sqlbase.NewSqlBackend(ctx, cfg)
|
||||
|
||||
Reference in new issue
Block a user