aboutsummaryrefslogtreecommitdiff
path: root/syncapi/storage/postgres
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-04-16 10:06:55 +0100
committerGitHub <noreply@github.com>2020-04-16 10:06:55 +0100
commitc1bca95adbe04a17d8feb91aa24dde9c4cffb1fb (patch)
treefca3ee9732ef93a9f8c664956c06de8b4c2c4058 /syncapi/storage/postgres
parentc2ea96190944d8e39b0c200e43b1eedfeeeb49a6 (diff)
Add SQL tracing via DENDRITE_TRACE_SQL (#968)
* Add SQL tracing via DENDRITE_TRACE_SQL Add this to `internal/sqlutil` in preparation for #897 * Not entirely
Diffstat (limited to 'syncapi/storage/postgres')
-rw-r--r--syncapi/storage/postgres/syncserver.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/syncapi/storage/postgres/syncserver.go b/syncapi/storage/postgres/syncserver.go
index ead1bf33..7fd75f06 100644
--- a/syncapi/storage/postgres/syncserver.go
+++ b/syncapi/storage/postgres/syncserver.go
@@ -25,6 +25,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/matrix-org/dendrite/clientapi/auth/authtypes"
+ "github.com/matrix-org/dendrite/internal/sqlutil"
"github.com/matrix-org/dendrite/roomserver/api"
// Import the postgres database driver.
@@ -62,7 +63,7 @@ type SyncServerDatasource struct {
func NewSyncServerDatasource(dbDataSourceName string) (*SyncServerDatasource, error) {
var d SyncServerDatasource
var err error
- if d.db, err = sql.Open("postgres", dbDataSourceName); err != nil {
+ if d.db, err = sqlutil.Open("postgres", dbDataSourceName); err != nil {
return nil, err
}
if err = d.PartitionOffsetStatements.Prepare(d.db, "syncapi"); err != nil {