From 5049ea9ba557a2cef0a24faeefffdefb7e8c136c Mon Sep 17 00:00:00 2001 From: Denis Volkov <3149929+Denchick@users.noreply.github.com> Date: Mon, 17 Jul 2023 11:48:34 +0500 Subject: [PATCH] Update github.com/jackc/pgx to v5 (#218) pgx v5 contains pgproto module with (possibly) better performance * update pgx to v5 * fix lint --- balancer/pkg/client.go | 2 +- balancer/pkg/console.go | 2 +- balancer/pkg/db.go | 2 +- balancer/pkg/installation.go | 2 +- cmd/mover/main.go | 2 +- cmd/spqrdump/main.go | 30 ++-- cmd/worldmock/worldmock.go | 2 +- coordinator/provider/coordinator.go | 2 +- go.mod | 22 +-- go.sum | 173 ++------------------- pkg/auth/auth.go | 2 +- pkg/auth/auth_test.go | 2 +- pkg/client/client.go | 2 +- pkg/clientinteractor/interactor.go | 2 +- pkg/conn/instance.go | 10 +- pkg/datashard/datashard.go | 2 +- pkg/shard/shard.go | 2 +- pkg/tsa/tsa.go | 2 +- router/client/client.go | 19 ++- router/console/console.go | 2 +- router/frontend.go | 2 +- router/rulerouter/pool_mgr.go | 2 +- router/rulerouter/relay.go | 2 +- router/rulerouter/rulerouter.go | 2 +- router/server/mirror.go | 2 +- router/server/multishard.go | 2 +- router/server/server.go | 2 +- router/server/shard.go | 2 +- test/logproxy/logproxy.go | 13 +- test/pdbg/pdbg.go | 15 +- test/pstmt/base/prepare_statement_basic.go | 49 +++--- 31 files changed, 111 insertions(+), 266 deletions(-) diff --git a/balancer/pkg/client.go b/balancer/pkg/client.go index 0c6ec9b7a..af57ee0a6 100644 --- a/balancer/pkg/client.go +++ b/balancer/pkg/client.go @@ -3,7 +3,7 @@ package pkg import ( "net" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/client" ) diff --git a/balancer/pkg/console.go b/balancer/pkg/console.go index 33be2cc3c..2afa9aab7 100644 --- a/balancer/pkg/console.go +++ b/balancer/pkg/console.go @@ -6,7 +6,7 @@ import ( "fmt" "strconv" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/client" "github.com/pg-sharding/spqr/pkg/clientinteractor" diff --git a/balancer/pkg/db.go b/balancer/pkg/db.go index 1c387baf1..74eb72a8d 100644 --- a/balancer/pkg/db.go +++ b/balancer/pkg/db.go @@ -11,7 +11,7 @@ import ( "sync" "time" - _ "github.com/jackc/pgx/v4/stdlib" + _ "github.com/jackc/pgx/v5/stdlib" "github.com/pg-sharding/spqr/pkg/spqrlog" "golang.yandex/hasql" "golang.yandex/hasql/checkers" diff --git a/balancer/pkg/installation.go b/balancer/pkg/installation.go index 6c5fdc6c0..56450801c 100644 --- a/balancer/pkg/installation.go +++ b/balancer/pkg/installation.go @@ -9,7 +9,7 @@ import ( "strings" "time" - "github.com/jackc/pgx/v4" + "github.com/jackc/pgx/v5" "golang.yandex/hasql" ) diff --git a/cmd/mover/main.go b/cmd/mover/main.go index 40f173f4e..0ee9ac885 100644 --- a/cmd/mover/main.go +++ b/cmd/mover/main.go @@ -7,7 +7,7 @@ import ( "io" "os" - "github.com/jackc/pgx/v4" + "github.com/jackc/pgx/v5" _ "github.com/lib/pq" "github.com/pg-sharding/spqr/pkg/models/kr" "github.com/pg-sharding/spqr/pkg/models/shrule" diff --git a/cmd/spqrdump/main.go b/cmd/spqrdump/main.go index 5d6df8f7a..ca9a8fd6c 100644 --- a/cmd/spqrdump/main.go +++ b/cmd/spqrdump/main.go @@ -6,7 +6,7 @@ import ( "fmt" "net" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/spf13/cobra" "google.golang.org/grpc" @@ -81,11 +81,11 @@ func getconn() (*pgproto3.Frontend, error) { return nil, err } - frontend := pgproto3.NewFrontend(pgproto3.NewChunkReader(cc), cc) - - if err := frontend.Send(&pgproto3.StartupMessage{ + frontend := pgproto3.NewFrontend(cc, cc) + frontend.Send(&pgproto3.StartupMessage{ ProtocolVersion: conn.SSLREQ, - }); err != nil { + }) + if err := frontend.Flush(); err != nil { return nil, err } @@ -99,16 +99,16 @@ func getconn() (*pgproto3.Frontend, error) { InsecureSkipVerify: true, }) - frontend = pgproto3.NewFrontend(pgproto3.NewChunkReader(cc), cc) - - if err := frontend.Send(&pgproto3.StartupMessage{ + frontend = pgproto3.NewFrontend(cc, cc) + frontend.Send(&pgproto3.StartupMessage{ ProtocolVersion: 196608, Parameters: map[string]string{ "user": "user1", "database": "spqr-console", "password": passwd, }, - }); err != nil { + }) + if err := frontend.Flush(); err != nil { spqrlog.Logger.Printf(spqrlog.ERROR, "startup failed %v", err) return nil, err } @@ -127,10 +127,10 @@ func DumpRulesPSQL() error { if err != nil { return err } - - if err := frontend.Send(&pgproto3.Query{ + frontend.Send(&pgproto3.Query{ String: "SHOW key_ranges;", - }); err != nil { + }) + if err := frontend.Flush(); err != nil { return err } @@ -166,10 +166,10 @@ func DumpKeyRangesPSQL() error { if err != nil { return err } - - if err := frontend.Send(&pgproto3.Query{ + frontend.Send(&pgproto3.Query{ String: "SHOW sharding_rules;", - }); err != nil { + }) + if err := frontend.Flush(); err != nil { return err } diff --git a/cmd/worldmock/worldmock.go b/cmd/worldmock/worldmock.go index b4e71d80f..5fba45761 100644 --- a/cmd/worldmock/worldmock.go +++ b/cmd/worldmock/worldmock.go @@ -5,7 +5,7 @@ import ( "net" "os" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/config" "github.com/pg-sharding/spqr/pkg/shard" diff --git a/coordinator/provider/coordinator.go b/coordinator/provider/coordinator.go index 1ea1e6f4f..ced64788c 100644 --- a/coordinator/provider/coordinator.go +++ b/coordinator/provider/coordinator.go @@ -16,7 +16,7 @@ import ( "github.com/pg-sharding/spqr/pkg/clientinteractor" "github.com/pg-sharding/spqr/pkg/spqrlog" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "google.golang.org/grpc" "github.com/pg-sharding/spqr/coordinator" diff --git a/go.mod b/go.mod index adf7c161e..5882b19d1 100644 --- a/go.mod +++ b/go.mod @@ -5,8 +5,7 @@ go 1.20 require ( github.com/BurntSushi/toml v1.3.2 github.com/golang/protobuf v1.5.3 - github.com/jackc/pgproto3/v2 v2.3.2 - github.com/jackc/pgx/v4 v4.18.1 + github.com/jackc/pgx/v5 v5.4.2 github.com/jmoiron/sqlx v1.3.5 github.com/juju/errors v1.0.0 github.com/lib/pq v1.10.9 @@ -24,13 +23,20 @@ require ( github.com/xdg-go/scram v1.1.2 go.etcd.io/etcd/client/v3 v3.5.9 go.uber.org/atomic v1.11.0 - golang.org/x/crypto v0.6.0 + golang.org/x/crypto v0.9.0 golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 golang.yandex/hasql v1.0.0 google.golang.org/grpc v1.56.2 gopkg.in/yaml.v2 v2.4.0 ) +require ( + github.com/gofrs/uuid v4.0.0+incompatible // indirect + github.com/mattn/go-colorable v0.1.12 // indirect + github.com/mattn/go-isatty v0.0.14 // indirect + github.com/rogpeppe/go-internal v1.11.0 // indirect +) + require ( github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect github.com/coreos/go-semver v0.3.0 // indirect @@ -38,15 +44,9 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/jackc/chunkreader/v2 v2.0.1 // indirect - github.com/jackc/pgconn v1.14.0 // indirect - github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect - github.com/jackc/pgtype v1.14.0 // indirect github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect - github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect @@ -55,8 +55,8 @@ require ( go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.17.0 // indirect - golang.org/x/net v0.9.0 // indirect - golang.org/x/sys v0.7.0 // indirect + golang.org/x/net v0.10.0 // indirect + golang.org/x/sys v0.8.0 // indirect golang.org/x/text v0.9.0 // indirect google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect google.golang.org/protobuf v1.30.0 // indirect diff --git a/go.sum b/go.sum index 96f6f8f9b..ad19c2f49 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,4 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= @@ -7,31 +6,21 @@ github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20O github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= -github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= -github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= @@ -46,58 +35,14 @@ github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= -github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= -github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= -github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= -github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= -github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= -github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= -github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= -github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= -github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= -github.com/jackc/pgconn v1.14.0 h1:vrbA9Ud87g6JdFWkHTJXppVce58qPIdP7N8y0Ml/A7Q= -github.com/jackc/pgconn v1.14.0/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E= -github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= -github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= -github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= -github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c= -github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5Wi/+Zz7xoE5ALHsRQlOctkOiHc= -github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= -github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= -github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= -github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= -github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= -github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= -github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.3.2 h1:7eY55bdBeCz1F2fTzSz69QC+pG46jYq9/jtSPiJ5nn0= -github.com/jackc/pgproto3/v2 v2.3.2/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= -github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= -github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= -github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= -github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= -github.com/jackc/pgtype v1.14.0 h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw= -github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= -github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= -github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= -github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= -github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= -github.com/jackc/pgx/v4 v4.18.1 h1:YP7G1KABtKpB5IHrO9vYwSrCOhs7p3uqhvhhQBptya0= -github.com/jackc/pgx/v4 v4.18.1/go.mod h1:FydWkUyadDmdNH/mHnGob881GawxeEm7TcMCzkb+qQE= -github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/pgx/v5 v5.4.2 h1:u1gmGDwbdRUZiwisBm/Ky2M14uQyUP65bG8+20nnyrg= +github.com/jackc/pgx/v5 v5.4.2/go.mod h1:q6iHT8uDNXWiFNOlRqJzBTaSH3+2xCXkokxHZC5qWFY= github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= @@ -108,30 +53,19 @@ github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uia github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-reuseport v0.3.0 h1:iiZslO5byUYZEg9iCwJGf5h+sf1Agmqx2V2FDjPyvUw= github.com/libp2p/go-reuseport v0.3.0/go.mod h1:laea40AimhtfEqysZ71UpYj4S+R9VpH8PgqLo7L+SwI= -github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= @@ -140,22 +74,6 @@ github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/pg-sharding/lyx v0.0.0-20230714125513-2b1e3e80d990 h1:oVHCRqJ+/Qadm+HHI0nJnaCU4Lo/pZNAbu/qPnEDCPQ= -github.com/pg-sharding/lyx v0.0.0-20230714125513-2b1e3e80d990/go.mod h1:2dPBQAhqv/30mhzj2yBXQkXhsGJQ8GhM+oWOfbGua58= -github.com/pg-sharding/lyx v0.0.0-20230714155954-34f8b0337e70 h1:e8CRr9Qiastv73yz172O1G0RThNam3n/9KbxRIVbGOs= -github.com/pg-sharding/lyx v0.0.0-20230714155954-34f8b0337e70/go.mod h1:2dPBQAhqv/30mhzj2yBXQkXhsGJQ8GhM+oWOfbGua58= -github.com/pg-sharding/lyx v0.0.0-20230714182604-e5d7cfed3b82 h1:zrf9fTvTlJJaY/eljxmK7I+lKaL7IaNXdBqeWp/pJQg= -github.com/pg-sharding/lyx v0.0.0-20230714182604-e5d7cfed3b82/go.mod h1:2dPBQAhqv/30mhzj2yBXQkXhsGJQ8GhM+oWOfbGua58= -github.com/pg-sharding/lyx v0.0.0-20230714210912-a88c802bbf6f h1:qWaq/5zQl+uMfqNtutKA7LU7McANmtD3zC63whOO2d0= -github.com/pg-sharding/lyx v0.0.0-20230714210912-a88c802bbf6f/go.mod h1:2dPBQAhqv/30mhzj2yBXQkXhsGJQ8GhM+oWOfbGua58= -github.com/pg-sharding/lyx v0.0.0-20230714213446-f46c27c2abd7 h1:G/hnW4DjzmB5YSgjyhLgdErKMWWU5qYTMFAkhIOYWTE= -github.com/pg-sharding/lyx v0.0.0-20230714213446-f46c27c2abd7/go.mod h1:2dPBQAhqv/30mhzj2yBXQkXhsGJQ8GhM+oWOfbGua58= -github.com/pg-sharding/lyx v0.0.0-20230715113021-f397f7c1a2aa h1:VX/oIYPaZCGnQxXH4k8hb7wqLdKZadUs+5vL+QmmoWI= -github.com/pg-sharding/lyx v0.0.0-20230715113021-f397f7c1a2aa/go.mod h1:2dPBQAhqv/30mhzj2yBXQkXhsGJQ8GhM+oWOfbGua58= -github.com/pg-sharding/lyx v0.0.0-20230715202144-c25aefea363e h1:pA0Om5aDIt3UIFi8obLnY0+RaXPfAh8RM8/htidBRIc= -github.com/pg-sharding/lyx v0.0.0-20230715202144-c25aefea363e/go.mod h1:TDtDSk2lwTaHL5L2gy3mPhiqHVLrsIh+DEpaRg8BkAA= -github.com/pg-sharding/lyx v0.0.0-20230715212621-20d9da48418c h1:aaTVdw2hIy0eRY8HZBqOKUFazoDgruKNV9MR2VcbOFw= -github.com/pg-sharding/lyx v0.0.0-20230715212621-20d9da48418c/go.mod h1:TDtDSk2lwTaHL5L2gy3mPhiqHVLrsIh+DEpaRg8BkAA= github.com/pg-sharding/lyx v0.0.0-20230715215506-7d8a0a6ee27f h1:cfHaPehuKhn/4cGxcqy73POPaAdmaKrNlzOvu0s1p3Q= github.com/pg-sharding/lyx v0.0.0-20230715215506-7d8a0a6ee27f/go.mod h1:TDtDSk2lwTaHL5L2gy3mPhiqHVLrsIh+DEpaRg8BkAA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -163,22 +81,14 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= -github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sevlyar/go-daemon v0.1.6 h1:EUh1MDjEM4BI109Jign0EaknA2izkOyi0LV3ro3QQGs= github.com/sevlyar/go-daemon v0.1.6/go.mod h1:6dJpPatBT9eUwM5VCw9Bt6CdX9Tk6UWvhW3MebLDRKE= -github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= -github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= @@ -186,20 +96,10 @@ github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRM github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= @@ -215,43 +115,26 @@ github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gi github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k= go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE= go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4= go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E= go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -260,41 +143,27 @@ golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= -golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= +golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -302,40 +171,25 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= -golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -358,12 +212,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= @@ -371,5 +221,4 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= diff --git a/pkg/auth/auth.go b/pkg/auth/auth.go index cc01f25c5..e0bd966d4 100644 --- a/pkg/auth/auth.go +++ b/pkg/auth/auth.go @@ -14,7 +14,7 @@ import ( "github.com/pg-sharding/spqr/pkg/conn" "github.com/pg-sharding/spqr/pkg/spqrlog" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/config" ) diff --git a/pkg/auth/auth_test.go b/pkg/auth/auth_test.go index 70908af10..06bf09c2e 100644 --- a/pkg/auth/auth_test.go +++ b/pkg/auth/auth_test.go @@ -4,7 +4,7 @@ import ( "bytes" "testing" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/auth" "github.com/pg-sharding/spqr/pkg/conn" "github.com/stretchr/testify/assert" diff --git a/pkg/client/client.go b/pkg/client/client.go index 4d29c06e2..5b218c4f4 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -5,7 +5,7 @@ import ( "crypto/tls" "net" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/shard" ) diff --git a/pkg/clientinteractor/interactor.go b/pkg/clientinteractor/interactor.go index 57cffa3f9..01438f49b 100644 --- a/pkg/clientinteractor/interactor.go +++ b/pkg/clientinteractor/interactor.go @@ -16,7 +16,7 @@ import ( "github.com/pg-sharding/spqr/pkg/client" "github.com/pg-sharding/spqr/pkg/spqrlog" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/models/datashards" "github.com/pg-sharding/spqr/pkg/models/kr" diff --git a/pkg/conn/instance.go b/pkg/conn/instance.go index 18600f886..2e102cad7 100644 --- a/pkg/conn/instance.go +++ b/pkg/conn/instance.go @@ -6,7 +6,7 @@ import ( "fmt" "net" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/spqrlog" ) @@ -77,7 +77,8 @@ func (pgi *PostgreSQLInstance) ShardName() string { } func (pgi *PostgreSQLInstance) Send(query pgproto3.FrontendMessage) error { - return pgi.frontend.Send(query) + pgi.frontend.Send(query) + return pgi.frontend.Flush() } func (pgi *PostgreSQLInstance) Receive() (pgproto3.BackendMessage, error) { @@ -110,12 +111,13 @@ func NewInstanceConn(host string, shard string, tlsconfig *tls.Config) (DBInstan Bool("ssl", tlsconfig != nil). Msg("instance acquire new connection") - instance.frontend = pgproto3.NewFrontend(pgproto3.NewChunkReader(instance.conn), instance.conn) + instance.frontend = pgproto3.NewFrontend(instance.conn, instance.conn) return instance, nil } func (pgi *PostgreSQLInstance) Cancel(csm *pgproto3.CancelRequest) error { - return pgi.frontend.Send(csm) + pgi.frontend.Send(csm) + return pgi.frontend.Flush() } func (pgi *PostgreSQLInstance) Tls() *tls.Config { diff --git a/pkg/datashard/datashard.go b/pkg/datashard/datashard.go index fdf34b526..97f4d590f 100644 --- a/pkg/datashard/datashard.go +++ b/pkg/datashard/datashard.go @@ -4,7 +4,7 @@ import ( "crypto/tls" "fmt" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/config" "github.com/pg-sharding/spqr/pkg/conn" "github.com/pg-sharding/spqr/pkg/models/kr" diff --git a/pkg/shard/shard.go b/pkg/shard/shard.go index 4357c190c..613ebfbf2 100644 --- a/pkg/shard/shard.go +++ b/pkg/shard/shard.go @@ -3,7 +3,7 @@ package shard import ( "crypto/tls" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/config" "github.com/pg-sharding/spqr/pkg/conn" "github.com/pg-sharding/spqr/pkg/models/kr" diff --git a/pkg/tsa/tsa.go b/pkg/tsa/tsa.go index 2d8b92675..3c5d0b54e 100644 --- a/pkg/tsa/tsa.go +++ b/pkg/tsa/tsa.go @@ -5,7 +5,7 @@ import ( "sync" "time" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/shard" "github.com/pg-sharding/spqr/pkg/spqrlog" "github.com/pg-sharding/spqr/pkg/txstatus" diff --git a/router/client/client.go b/router/client/client.go index 827ba5139..c815dad5c 100644 --- a/router/client/client.go +++ b/router/client/client.go @@ -10,7 +10,7 @@ import ( "net" "sync" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/auth" "github.com/pg-sharding/spqr/pkg/client" "github.com/pg-sharding/spqr/pkg/config" @@ -546,7 +546,7 @@ func (cl *PsqlClient) Init(tlsconfig *tls.Config) error { cl.conn = tls.Server(cl.conn, tlsconfig) - backend = pgproto3.NewBackend(pgproto3.NewChunkReader(bufio.NewReader(cl.conn)), cl.conn) + backend = pgproto3.NewBackend(bufio.NewReader(cl.conn), cl.conn) frsm, err := backend.ReceiveStartupMessage() @@ -569,7 +569,7 @@ func (cl *PsqlClient) Init(tlsconfig *tls.Config) error { spqrlog.Zero.Error().Err(err).Msg("") return err } - backend = pgproto3.NewBackend(pgproto3.NewChunkReader(bufio.NewReader(cl.conn)), cl.conn) + backend = pgproto3.NewBackend(bufio.NewReader(cl.conn), cl.conn) if err != nil { spqrlog.Zero.Error().Err(err).Msg("") return err @@ -727,16 +727,17 @@ func (cl *PsqlClient) PasswordCT() string { return db } - _ = cl.be.Send(&pgproto3.AuthenticationCleartextPassword{}) + cl.be.Send(&pgproto3.AuthenticationCleartextPassword{}) + _ = cl.be.Flush() return cl.receivepasswd() } func (cl *PsqlClient) PasswordMD5(salt [4]byte) string { - _ = cl.be.Send(&pgproto3.AuthenticationMD5Password{ + cl.be.Send(&pgproto3.AuthenticationMD5Password{ Salt: salt, }) - + _ = cl.be.Flush() return cl.receivepasswd() } @@ -754,7 +755,8 @@ func (cl *PsqlClient) Send(msg pgproto3.BackendMessage) error { Uint("client", spqrlog.GetPointer(cl)). Type("msg-type", msg). Msg("") - return cl.be.Send(msg) + cl.be.Send(msg) + return cl.be.Flush() } func (cl *PsqlClient) SendCtx(ctx context.Context, msg pgproto3.BackendMessage) error { @@ -764,7 +766,8 @@ func (cl *PsqlClient) SendCtx(ctx context.Context, msg pgproto3.BackendMessage) Msg("") ch := make(chan error) go func() { - ch <- cl.be.Send(msg) + cl.be.Send(msg) + ch <- cl.be.Flush() }() select { case <-ctx.Done(): diff --git a/router/console/console.go b/router/console/console.go index 8a832768e..87455577b 100644 --- a/router/console/console.go +++ b/router/console/console.go @@ -4,7 +4,7 @@ import ( "context" "crypto/tls" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/client" "github.com/pg-sharding/spqr/pkg/clientinteractor" "github.com/pg-sharding/spqr/pkg/meta" diff --git a/router/frontend.go b/router/frontend.go index 8956ba6d8..9b33de54d 100644 --- a/router/frontend.go +++ b/router/frontend.go @@ -4,7 +4,7 @@ import ( "fmt" "io" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/config" "github.com/pg-sharding/spqr/pkg/spqrlog" "github.com/pg-sharding/spqr/pkg/txstatus" diff --git a/router/rulerouter/pool_mgr.go b/router/rulerouter/pool_mgr.go index ca777b59f..39d1b915e 100644 --- a/router/rulerouter/pool_mgr.go +++ b/router/rulerouter/pool_mgr.go @@ -5,7 +5,7 @@ import ( "sort" "strings" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/config" "github.com/pg-sharding/spqr/pkg/models/kr" "github.com/pg-sharding/spqr/pkg/spqrlog" diff --git a/router/rulerouter/relay.go b/router/rulerouter/relay.go index b766be83d..70163dc7c 100644 --- a/router/rulerouter/relay.go +++ b/router/rulerouter/relay.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/opentracing/opentracing-go" "github.com/pg-sharding/spqr/pkg/config" "github.com/pg-sharding/spqr/pkg/models/kr" diff --git a/router/rulerouter/rulerouter.go b/router/rulerouter/rulerouter.go index ce56b5352..de3afa5d5 100644 --- a/router/rulerouter/rulerouter.go +++ b/router/rulerouter/rulerouter.go @@ -6,7 +6,7 @@ import ( "net" "sync" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/auth" "github.com/pg-sharding/spqr/pkg/client" "github.com/pg-sharding/spqr/pkg/config" diff --git a/router/server/mirror.go b/router/server/mirror.go index 4edf89d83..046851600 100644 --- a/router/server/mirror.go +++ b/router/server/mirror.go @@ -1,7 +1,7 @@ package server import ( - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/pool" "github.com/pg-sharding/spqr/pkg/shard" ) diff --git a/router/server/multishard.go b/router/server/multishard.go index 782daab7c..1323da625 100644 --- a/router/server/multishard.go +++ b/router/server/multishard.go @@ -4,7 +4,7 @@ import ( "crypto/tls" "fmt" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/config" "github.com/pg-sharding/spqr/pkg/models/kr" "github.com/pg-sharding/spqr/pkg/pool" diff --git a/router/server/server.go b/router/server/server.go index d2576635d..f0b30fcfe 100644 --- a/router/server/server.go +++ b/router/server/server.go @@ -1,7 +1,7 @@ package server import ( - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/config" "github.com/pg-sharding/spqr/pkg/models/kr" "github.com/pg-sharding/spqr/pkg/shard" diff --git a/router/server/shard.go b/router/server/shard.go index 7d86f4315..9f55fe01c 100644 --- a/router/server/shard.go +++ b/router/server/shard.go @@ -5,7 +5,7 @@ import ( "fmt" "sync" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/config" "github.com/pg-sharding/spqr/pkg/models/kr" "github.com/pg-sharding/spqr/pkg/pool" diff --git a/test/logproxy/logproxy.go b/test/logproxy/logproxy.go index 5ed6cb8a7..2a8ef9114 100644 --- a/test/logproxy/logproxy.go +++ b/test/logproxy/logproxy.go @@ -6,7 +6,7 @@ import ( "net" "os" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/spqrlog" //"github.com/pg-sharding/spqr/pkg/config" //"github.com/pg-sharding/spqr/router/pkg/client" @@ -71,8 +71,8 @@ func (p *Proxy) serv(netconn net.Conn) error { return err } - frontend := pgproto3.NewFrontend(pgproto3.NewChunkReader(conn), conn) - cl := pgproto3.NewBackend(pgproto3.NewChunkReader(netconn), netconn) + frontend := pgproto3.NewFrontend(conn, conn) + cl := pgproto3.NewBackend(netconn, netconn) // err = cl.Init(nil, config.SSLMODEDISABLE) @@ -125,7 +125,8 @@ func (p *Proxy) serv(netconn net.Conn) error { if err != nil { return fmt.Errorf(failedToReceiveMessage, err) } - if err := frontend.Send(msg); err != nil { + frontend.Send(msg) + if err := frontend.Flush(); err != nil { return fmt.Errorf(failedToReceiveMessage, err) } for { @@ -134,8 +135,8 @@ func (p *Proxy) serv(netconn net.Conn) error { return fmt.Errorf(failedToReceiveMessage, err) } - err = cl.Send(retmsg) - if err != nil { + cl.Send(retmsg) + if err := cl.Flush(); err != nil { return fmt.Errorf(failedToReceiveMessage, err) } diff --git a/test/pdbg/pdbg.go b/test/pdbg/pdbg.go index 30c264327..93594e965 100644 --- a/test/pdbg/pdbg.go +++ b/test/pdbg/pdbg.go @@ -6,7 +6,7 @@ import ( "net" "os" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" ) func getC() (net.Conn, error) { @@ -24,7 +24,7 @@ func main() { return } - frontend := pgproto3.NewFrontend(pgproto3.NewChunkReader(conn), conn) + frontend := pgproto3.NewFrontend(conn, conn) sm := pgproto3.StartupMessage{ ProtocolVersion: 196608, Parameters: map[string]string{ @@ -32,8 +32,8 @@ func main() { "user": "user1", }, } - - if err := frontend.Send(&sm); err != nil { + frontend.Send(&sm) + if err := frontend.Flush(); err != nil { fmt.Printf("failed %v", err) return } @@ -58,8 +58,8 @@ func main() { Name: name, Query: query, } - - if err := frontend.Send(msg); err != nil { + frontend.Send(msg) + if err := frontend.Flush(); err != nil { fmt.Printf("failed %v", err) return } @@ -77,7 +77,8 @@ func main() { ObjectType: 'S', Name: name, } - if err := frontend.Send(msg2); err != nil { + frontend.Send(msg2) + if err := frontend.Flush(); err != nil { fmt.Printf("failed %v", err) return } diff --git a/test/pstmt/base/prepare_statement_basic.go b/test/pstmt/base/prepare_statement_basic.go index 5ada20315..b4f162ab8 100644 --- a/test/pstmt/base/prepare_statement_basic.go +++ b/test/pstmt/base/prepare_statement_basic.go @@ -7,7 +7,7 @@ import ( "sync" "time" - "github.com/jackc/pgproto3/v2" + "github.com/jackc/pgx/v5/pgproto3" "github.com/pg-sharding/spqr/pkg/spqrlog" ) @@ -50,46 +50,34 @@ func waitRFQ(fr *pgproto3.Frontend) error { func prepLong(fr *pgproto3.Frontend, waitforres bool) error { if *doErr { - if err := fr.Send(&pgproto3.Parse{ + fr.Send(&pgproto3.Parse{ Name: "s1", Query: "SELECT 1/0", - }); err != nil { - return err - } + }) } else { - if err := fr.Send(&pgproto3.Parse{ + fr.Send(&pgproto3.Parse{ Name: "s1", Query: "SELECT 1", - }); err != nil { - return err - } + }) } - if err := fr.Send(&pgproto3.Describe{ + fr.Send(&pgproto3.Describe{ Name: "s1", ObjectType: byte('S'), - }); err != nil { - return err - } - - if err := fr.Send(&pgproto3.Sync{}); err != nil { + }) + fr.Send(&pgproto3.Sync{}) + if err := fr.Flush(); err != nil { return err } if err := waitRFQ(fr); err != nil { return err } - - if err := fr.Send(&pgproto3.Bind{ + fr.Send(&pgproto3.Bind{ PreparedStatement: "s1", - }); err != nil { - return err - } - - if err := fr.Send(&pgproto3.Execute{}); err != nil { - return err - } - - if err := fr.Send(&pgproto3.Sync{}); err != nil { + }) + fr.Send(&pgproto3.Execute{}) + fr.Send(&pgproto3.Sync{}) + if err := fr.Flush(); err != nil { return err } @@ -112,16 +100,17 @@ func gaogao(wg *sync.WaitGroup, waitforres bool) { } defer conn.Close() - frontend := pgproto3.NewFrontend(pgproto3.NewChunkReader(conn), conn) - - if err := frontend.Send(&pgproto3.StartupMessage{ + frontend := pgproto3.NewFrontend(conn, conn) + frontend.Send(&pgproto3.StartupMessage{ ProtocolVersion: 196608, Parameters: map[string]string{ "user": "user1", "database": "db1", "password": "12345678", }, - }); err != nil { + }) + if err := frontend.Flush(); err != nil { + spqrlog.Logger.Printf(spqrlog.ERROR, "startup failed %v", err) if err != okerr { panic(err) }