Migrate the scouting database to postgres

The existing database is sqlite3. That is not usable by Tableau which
is the visualization tool we use. Tableau also appears incapable of
scraping, say, JSON from our scouting app.

This patch migrates our application to use postgres instead of
sqlite3. That database will be accessible by Tableau.

I created a `testdb_server` application that sets up postgres in the
linux-sandbox in a bazel test. This is useful in the various tests
that we run on the scouting application.

Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I9cd260f8998b9607e1e3229ab70f243cdded5ec5
diff --git a/.bazelrc b/.bazelrc
index b12d5b2..e0fcd81 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -105,3 +105,6 @@
 
 # Prevent falling back to the host JDK.
 startup --noautodetect_server_javabase
+
+# Give each build action and test its own /tmp.
+build --sandbox_tmpfs_path=/tmp
diff --git a/BUILD b/BUILD
index 0d79e19..70ef3f6 100644
--- a/BUILD
+++ b/BUILD
@@ -11,6 +11,7 @@
 # gazelle:go_generate_proto false
 # gazelle:exclude third_party
 # gazelle:exclude external
+# gazelle:resolve go github.com/phst/runfiles @com_github_phst_runfiles//:go_default_library
 # gazelle:resolve go github.com/frc971/971-Robot-Code/build_tests/fbs //build_tests:test_go_fbs
 # gazelle:resolve go github.com/frc971/971-Robot-Code/scouting/webserver/requests/messages/error_response //scouting/webserver/requests/messages:error_response_go_fbs
 # gazelle:resolve go github.com/frc971/971-Robot-Code/scouting/webserver/requests/messages/submit_data_scouting //scouting/webserver/requests/messages:submit_data_scouting_go_fbs
diff --git a/go.mod b/go.mod
index fb6a573..c495e61 100644
--- a/go.mod
+++ b/go.mod
@@ -12,11 +12,23 @@
 
 require (
 	github.com/cenkalti/backoff v2.2.1+incompatible // indirect
-	github.com/davecgh/go-spew v1.1.0
+	github.com/davecgh/go-spew v1.1.1
 	github.com/google/go-querystring v1.1.0 // indirect
-	golang.org/x/net v0.0.0-20200822124328-c89045814202 // indirect
-	golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd // indirect
-	golang.org/x/text v0.3.0 // indirect
+	github.com/jackc/pgx v3.6.2+incompatible
+	github.com/phst/runfiles v0.0.0-20220125203201-388095b3a22d
+	golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 // indirect
+	golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect
+	golang.org/x/text v0.3.6 // indirect
 	google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
 	google.golang.org/protobuf v1.26.0 // indirect
 )
+
+require (
+	github.com/cockroachdb/apd v1.1.0 // indirect
+	github.com/gofrs/uuid v4.0.0+incompatible // indirect
+	github.com/jackc/fake v0.0.0-20150926172116-812a484cc733 // indirect
+	github.com/lib/pq v1.10.2 // indirect
+	github.com/pkg/errors v0.8.1 // indirect
+	github.com/shopspring/decimal v1.2.0 // indirect
+	golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 // indirect
+)
diff --git a/go.sum b/go.sum
index 9ac49b8..2208cf9 100644
--- a/go.sum
+++ b/go.sum
@@ -15,8 +15,11 @@
 github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
 github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
 github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
-github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
+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/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/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
 github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
 github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
@@ -24,6 +27,8 @@
 github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
 github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
 github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=
+github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
 github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
 github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@@ -54,17 +59,31 @@
 github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
 github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
+github.com/jackc/fake v0.0.0-20150926172116-812a484cc733 h1:vr3AYkKovP8uR8AvSGGUK1IDqRa5lAAvEkZG1LKaCRc=
+github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ=
+github.com/jackc/pgx v3.6.2+incompatible h1:2zP5OD7kiyR3xzRYMhOcXVvkDZsImVXfj+yIyTQf3/o=
+github.com/jackc/pgx v3.6.2+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I=
+github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8=
+github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
 github.com/mattn/go-sqlite3 v1.14.10 h1:MLn+5bFRlWMGoSRmJour3CL1w/qL96mvipqpwQW/Sfk=
 github.com/mattn/go-sqlite3 v1.14.10/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
+github.com/phst/runfiles v0.0.0-20220125203201-388095b3a22d h1:N5aMcF9W9AjW4ed+PJhA7+FjdgPa9gJ+St3mNu2tq1Q=
+github.com/phst/runfiles v0.0.0-20220125203201-388095b3a22d/go.mod h1:+oijTyzCf6Qe7sczsCOuoeX11IxZ+UkXXlhLrfyHlzg=
+github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
+github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
 github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
 github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
+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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
 github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
 go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI=
+golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
 golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
 golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
 golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
@@ -75,8 +94,9 @@
 golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 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-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA=
 golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
 golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -86,10 +106,16 @@
 golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884=
 golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 h1:SrN+KX8Art/Sf4HNj6Zcz06G7VEz+7w9tdXTPOZ7+l4=
+golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
+golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
 golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
diff --git a/go_deps.bzl b/go_deps.bzl
index 30d0311..cc1411d 100644
--- a/go_deps.bzl
+++ b/go_deps.bzl
@@ -63,10 +63,16 @@
         version = "v0.0.0-20211011173535-cb28da3451f1",
     )
     maybe_override_go_dep(
+        name = "com_github_cockroachdb_apd",
+        importpath = "github.com/cockroachdb/apd",
+        sum = "h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=",
+        version = "v1.1.0",
+    )
+    maybe_override_go_dep(
         name = "com_github_davecgh_go_spew",
         importpath = "github.com/davecgh/go-spew",
-        sum = "h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=",
-        version = "v1.1.0",
+        sum = "h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=",
+        version = "v1.1.1",
     )
     maybe_override_go_dep(
         name = "com_github_envoyproxy_go_control_plane",
@@ -87,6 +93,12 @@
         version = "v1.0.0",
     )
     maybe_override_go_dep(
+        name = "com_github_gofrs_uuid",
+        importpath = "github.com/gofrs/uuid",
+        sum = "h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=",
+        version = "v4.0.0+incompatible",
+    )
+    maybe_override_go_dep(
         name = "com_github_golang_glog",
         importpath = "github.com/golang/glog",
         sum = "h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=",
@@ -129,12 +141,42 @@
         version = "v1.16.0",
     )
     maybe_override_go_dep(
+        name = "com_github_jackc_fake",
+        importpath = "github.com/jackc/fake",
+        sum = "h1:vr3AYkKovP8uR8AvSGGUK1IDqRa5lAAvEkZG1LKaCRc=",
+        version = "v0.0.0-20150926172116-812a484cc733",
+    )
+    maybe_override_go_dep(
+        name = "com_github_jackc_pgx",
+        importpath = "github.com/jackc/pgx",
+        sum = "h1:2zP5OD7kiyR3xzRYMhOcXVvkDZsImVXfj+yIyTQf3/o=",
+        version = "v3.6.2+incompatible",
+    )
+    maybe_override_go_dep(
+        name = "com_github_lib_pq",
+        importpath = "github.com/lib/pq",
+        sum = "h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8=",
+        version = "v1.10.2",
+    )
+    maybe_override_go_dep(
         name = "com_github_mattn_go_sqlite3",
         importpath = "github.com/mattn/go-sqlite3",
         sum = "h1:MLn+5bFRlWMGoSRmJour3CL1w/qL96mvipqpwQW/Sfk=",
         version = "v1.14.10",
     )
     maybe_override_go_dep(
+        name = "com_github_phst_runfiles",
+        importpath = "github.com/phst/runfiles",
+        sum = "h1:N5aMcF9W9AjW4ed+PJhA7+FjdgPa9gJ+St3mNu2tq1Q=",
+        version = "v0.0.0-20220125203201-388095b3a22d",
+    )
+    maybe_override_go_dep(
+        name = "com_github_pkg_errors",
+        importpath = "github.com/pkg/errors",
+        sum = "h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=",
+        version = "v0.8.1",
+    )
+    maybe_override_go_dep(
         name = "com_github_pmezard_go_difflib",
         importpath = "github.com/pmezard/go-difflib",
         sum = "h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=",
@@ -153,6 +195,12 @@
         version = "v1.2.0",
     )
     maybe_override_go_dep(
+        name = "com_github_shopspring_decimal",
+        importpath = "github.com/shopspring/decimal",
+        sum = "h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=",
+        version = "v1.2.0",
+    )
+    maybe_override_go_dep(
         name = "com_github_stretchr_objx",
         importpath = "github.com/stretchr/objx",
         sum = "h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=",
@@ -221,8 +269,8 @@
     maybe_override_go_dep(
         name = "org_golang_x_crypto",
         importpath = "golang.org/x/crypto",
-        sum = "h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=",
-        version = "v0.0.0-20200622213623-75b288015ac9",
+        sum = "h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI=",
+        version = "v0.0.0-20210711020723-a769d52b0f97",
     )
     maybe_override_go_dep(
         name = "org_golang_x_exp",
@@ -239,8 +287,8 @@
     maybe_override_go_dep(
         name = "org_golang_x_net",
         importpath = "golang.org/x/net",
-        sum = "h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA=",
-        version = "v0.0.0-20200822124328-c89045814202",
+        sum = "h1:qWPm9rbaAMKs8Bq/9LRpbMqxWRVUAQwMI9fVrssnTfw=",
+        version = "v0.0.0-20210226172049-e18ecbb05110",
     )
     maybe_override_go_dep(
         name = "org_golang_x_oauth2",
@@ -257,14 +305,20 @@
     maybe_override_go_dep(
         name = "org_golang_x_sys",
         importpath = "golang.org/x/sys",
-        sum = "h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884=",
-        version = "v0.0.0-20200323222414-85ca7c5b95cd",
+        sum = "h1:SrN+KX8Art/Sf4HNj6Zcz06G7VEz+7w9tdXTPOZ7+l4=",
+        version = "v0.0.0-20210615035016-665e8c7367d1",
+    )
+    maybe_override_go_dep(
+        name = "org_golang_x_term",
+        importpath = "golang.org/x/term",
+        sum = "h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=",
+        version = "v0.0.0-20201126162022-7de9c90e9dd1",
     )
     maybe_override_go_dep(
         name = "org_golang_x_text",
         importpath = "golang.org/x/text",
-        sum = "h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=",
-        version = "v0.3.0",
+        sum = "h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=",
+        version = "v0.3.6",
     )
     maybe_override_go_dep(
         name = "org_golang_x_tools",
diff --git a/scouting/README.md b/scouting/README.md
index 4c43a2a..7789c8f 100644
--- a/scouting/README.md
+++ b/scouting/README.md
@@ -1,15 +1,45 @@
-Scouting web server
+Scouting App
 ================================================================================
+There are 2 big parts to the scouting app:
+- The database
+- The webserver
 
+If you want to run the scouting app, you will need to run both of the above
+mentioned parts.
+
+
+Running the database
+--------------------------------------------------------------------------------
+Run the database like so:
+
+    $ bazel run //scouting/db/testdb_server -- --port 2345
+
+Choose a port that no one else is using. Anything above 1024 should be fine.
+
+Wait until the database has fully started up before starting the webserver.
+
+
+Running the webserver
+--------------------------------------------------------------------------------
 The `//scouting` target runs the webserver and hosts all the web pages. Run it
 like so:
 
-    $ bazel run //scouting
+    $ bazel run //scouting -- --testdb_port 2345 --port 1234
 
-You can customize the port like so:
+The `--testdb_port` value must match the port you selected when running the
+database.
 
-    $ bazel run //scouting -- --port 1234
+The `--port` value must be one that no one else is using. Anything above 1024
+should be fine.
 
-See all options like this:
 
-    $ bazel run //scouting -- --help
+Viewing the scouting app on your computer
+--------------------------------------------------------------------------------
+When you run the webserver on the build server, you cannot access the
+scouting app without a port forward. You can use a separate terminal for this.
+
+    $ ssh -L 1234:localhost:1234 <build_server>
+
+where `1234` is the port that your instance of the webserver is using.
+`<build_server>` is the SSH Host entry in your `~/.ssh/config` file for the
+build server.
diff --git a/scouting/db/BUILD b/scouting/db/BUILD
index e89332d..7fbd2e2 100644
--- a/scouting/db/BUILD
+++ b/scouting/db/BUILD
@@ -6,12 +6,16 @@
     importpath = "github.com/frc971/971-Robot-Code/scouting/db",
     target_compatible_with = ["@platforms//cpu:x86_64"],
     visibility = ["//visibility:public"],
-    deps = ["@com_github_mattn_go_sqlite3//:go-sqlite3"],
+    deps = ["@com_github_jackc_pgx//stdlib"],
 )
 
 go_test(
     name = "db_test",
+    size = "small",
     srcs = ["db_test.go"],
+    data = [
+        "//scouting/db/testdb_server",
+    ],
     embed = [":db"],
     target_compatible_with = ["@platforms//cpu:x86_64"],
 )
diff --git a/scouting/db/db.go b/scouting/db/db.go
index 94e9056..0d9bec1 100644
--- a/scouting/db/db.go
+++ b/scouting/db/db.go
@@ -5,7 +5,7 @@
 	"errors"
 	"fmt"
 
-	_ "github.com/mattn/go-sqlite3"
+	_ "github.com/jackc/pgx/stdlib"
 )
 
 type Database struct {
@@ -32,21 +32,22 @@
 	Notes      []string
 }
 
-// Opens a database at the specified path. If the path refers to a non-existent
-// file, the database will be created and initialized with empty tables.
-func NewDatabase(path string) (*Database, error) {
+// Opens a database at the specified port on localhost. We currently don't
+// support connecting to databases on other hosts.
+func NewDatabase(user string, password string, port int) (*Database, error) {
 	var err error
 	database := new(Database)
-	database.DB, err = sql.Open("sqlite3", path)
-	if err != nil {
-		return nil, errors.New(fmt.Sprint("Failed to create postgres db: ", err))
-	}
 
+	psqlInfo := fmt.Sprintf("postgres://%s:%s@localhost:%d/postgres", user, password, port)
+	database.DB, err = sql.Open("pgx", psqlInfo)
+	if err != nil {
+		return nil, errors.New(fmt.Sprint("Failed to connect to postgres: ", err))
+	}
 	statement, err := database.Prepare("CREATE TABLE IF NOT EXISTS matches (" +
-		"id INTEGER PRIMARY KEY, " +
+		"id SERIAL PRIMARY KEY, " +
 		"MatchNumber INTEGER, " +
 		"Round INTEGER, " +
-		"CompLevel INTEGER, " +
+		"CompLevel VARCHAR, " +
 		"R1 INTEGER, " +
 		"R2 INTEGER, " +
 		"R3 INTEGER, " +
@@ -60,17 +61,19 @@
 		"b2ID INTEGER, " +
 		"b3ID INTEGER)")
 	if err != nil {
+		database.Close()
 		return nil, errors.New(fmt.Sprint("Failed to prepare matches table creation: ", err))
 	}
 	defer statement.Close()
 
 	_, err = statement.Exec()
 	if err != nil {
+		database.Close()
 		return nil, errors.New(fmt.Sprint("Failed to create matches table: ", err))
 	}
 
 	statement, err = database.Prepare("CREATE TABLE IF NOT EXISTS team_match_stats (" +
-		"id INTEGER PRIMARY KEY, " +
+		"id SERIAL PRIMARY KEY, " +
 		"TeamNumber INTEGER, " +
 		"MatchNumber INTEGER, " +
 		"ShotsMissed INTEGER, " +
@@ -82,17 +85,19 @@
 		"PlayedDefense INTEGER, " +
 		"Climbing INTEGER)")
 	if err != nil {
+		database.Close()
 		return nil, errors.New(fmt.Sprint("Failed to prepare stats table creation: ", err))
 	}
 	defer statement.Close()
 
 	_, err = statement.Exec()
 	if err != nil {
+		database.Close()
 		return nil, errors.New(fmt.Sprint("Failed to create team_match_stats table: ", err))
 	}
 
 	statement, err = database.Prepare("CREATE TABLE IF NOT EXISTS team_notes (" +
-		"id INTEGER PRIMARY KEY, " +
+		"id SERIAL PRIMARY KEY, " +
 		"TeamNumber INTEGER, " +
 		"Notes TEXT)")
 	if err != nil {
@@ -146,10 +151,11 @@
 		"ShotsMissedAuto, UpperGoalAuto, LowerGoalAuto, " +
 		"PlayedDefense, Climbing) " +
 		"VALUES (" +
-		"?, ?, " +
-		"?, ?, ?, " +
-		"?, ?, ?, " +
-		"?, ?)")
+		"$1, $2, " +
+		"$3, $4, $5, " +
+		"$6, $7, $8, " +
+		"$9, $10) " +
+		"RETURNING id")
 	if err != nil {
 		return errors.New(fmt.Sprint("Failed to prepare insertion into stats database: ", err))
 	}
@@ -157,14 +163,11 @@
 
 	var rowIds [6]int64
 	for i, TeamNumber := range []int32{m.R1, m.R2, m.R3, m.B1, m.B2, m.B3} {
-		result, err := statement.Exec(TeamNumber, m.MatchNumber, 0, 0, 0, 0, 0, 0, 0, 0)
+		row := statement.QueryRow(TeamNumber, m.MatchNumber, 0, 0, 0, 0, 0, 0, 0, 0)
+		err = row.Scan(&rowIds[i])
 		if err != nil {
 			return errors.New(fmt.Sprint("Failed to insert stats: ", err))
 		}
-		rowIds[i], err = result.LastInsertId()
-		if err != nil {
-			return errors.New(fmt.Sprint("Failed to get last insert ID: ", err))
-		}
 	}
 
 	statement, err = database.Prepare("INSERT INTO matches(" +
@@ -172,9 +175,9 @@
 		"R1, R2, R3, B1, B2, B3, " +
 		"r1ID, r2ID, r3ID, b1ID, b2ID, b3ID) " +
 		"VALUES (" +
-		"?, ?, ?, " +
-		"?, ?, ?, ?, ?, ?, " +
-		"?, ?, ?, ?, ?, ?)")
+		"$1, $2, $3, " +
+		"$4, $5, $6, $7, $8, $9, " +
+		"$10, $11, $12, $13, $14, $15)")
 	if err != nil {
 		return errors.New(fmt.Sprint("Failed to prepare insertion into match database: ", err))
 	}
@@ -191,11 +194,11 @@
 
 func (database *Database) AddToStats(s Stats) error {
 	statement, err := database.Prepare("UPDATE team_match_stats SET " +
-		"TeamNumber = ?, MatchNumber = ?, " +
-		"ShotsMissed = ?, UpperGoalShots = ?, LowerGoalShots = ?, " +
-		"ShotsMissedAuto = ?, UpperGoalAuto = ?, LowerGoalAuto = ?, " +
-		"PlayedDefense = ?, Climbing = ? " +
-		"WHERE MatchNumber = ? AND TeamNumber = ?")
+		"TeamNumber = $1, MatchNumber = $2, " +
+		"ShotsMissed = $3, UpperGoalShots = $4, LowerGoalShots = $5, " +
+		"ShotsMissedAuto = $6, UpperGoalAuto = $7, LowerGoalAuto = $8, " +
+		"PlayedDefense = $9, Climbing = $10 " +
+		"WHERE MatchNumber = $11 AND TeamNumber = $12")
 	if err != nil {
 		return errors.New(fmt.Sprint("Failed to prepare stats update statement: ", err))
 	}
@@ -269,7 +272,7 @@
 
 func (database *Database) QueryMatches(teamNumber_ int32) ([]Match, error) {
 	rows, err := database.Query("SELECT * FROM matches WHERE "+
-		"R1 = ? OR R2 = ? OR R3 = ? OR B1 = ? OR B2 = ? OR B3 = ?",
+		"R1 = $1 OR R2 = $2 OR R3 = $3 OR B1 = $4 OR B2 = $5 OR B3 = $6",
 		teamNumber_, teamNumber_, teamNumber_, teamNumber_, teamNumber_, teamNumber_)
 	if err != nil {
 		return nil, errors.New(fmt.Sprint("Failed to select from matches for team: ", err))
@@ -292,7 +295,7 @@
 }
 
 func (database *Database) QueryStats(teamNumber_ int) ([]Stats, error) {
-	rows, err := database.Query("SELECT * FROM team_match_stats WHERE TeamNumber = ?", teamNumber_)
+	rows, err := database.Query("SELECT * FROM team_match_stats WHERE TeamNumber = $1", teamNumber_)
 	if err != nil {
 		return nil, errors.New(fmt.Sprint("Failed to select from stats: ", err))
 	}
@@ -315,7 +318,7 @@
 }
 
 func (database *Database) QueryNotes(TeamNumber int32) (NotesData, error) {
-	rows, err := database.Query("SELECT * FROM team_notes WHERE TeamNumber = ?", TeamNumber)
+	rows, err := database.Query("SELECT * FROM team_notes WHERE TeamNumber = $1", TeamNumber)
 	if err != nil {
 		return NotesData{}, errors.New(fmt.Sprint("Failed to select from notes: ", err))
 	}
@@ -340,7 +343,7 @@
 	}
 	statement, err := database.Prepare("INSERT INTO " +
 		"team_notes(TeamNumber, Notes)" +
-		"VALUES (?, ?)")
+		"VALUES ($1, $2)")
 	if err != nil {
 		return errors.New(fmt.Sprint("Failed to prepare insertion into notes table: ", err))
 	}
diff --git a/scouting/db/db_test.go b/scouting/db/db_test.go
index 13a43f8..16bc176 100644
--- a/scouting/db/db_test.go
+++ b/scouting/db/db_test.go
@@ -2,10 +2,12 @@
 
 import (
 	"fmt"
+	"log"
 	"os"
-	"path/filepath"
+	"os/exec"
 	"reflect"
 	"testing"
+	"time"
 )
 
 // Shortcut for error checking. If the specified error is non-nil, print the
@@ -16,19 +18,48 @@
 	}
 }
 
-// Creates a database in TEST_TMPDIR so that we don't accidentally write it
-// into the runfiles directory.
-func createDatabase(t *testing.T) *Database {
-	// Get the path to our temporary writable directory.
-	testTmpdir := os.Getenv("TEST_TMPDIR")
-	db, err := NewDatabase(filepath.Join(testTmpdir, "scouting.db"))
-	check(t, err, "Failed to create new database")
-	return db
+type dbFixture struct {
+	db     *Database
+	server *exec.Cmd
+}
+
+func (fixture dbFixture) TearDown() {
+	fixture.db.Delete()
+	fixture.db.Close()
+	log.Println("Shutting down testdb")
+	fixture.server.Process.Signal(os.Interrupt)
+	fixture.server.Process.Wait()
+	log.Println("Successfully shut down testdb")
+}
+
+func createDatabase(t *testing.T) dbFixture {
+	var fixture dbFixture
+
+	log.Println("Starting up postgres.")
+	fixture.server = exec.Command("testdb_server/testdb_server_/testdb_server")
+	fixture.server.Stdout = os.Stdout
+	fixture.server.Stderr = os.Stderr
+	err := fixture.server.Start()
+	check(t, err, "Failed to run postgres")
+
+	// Wait until the server is ready. We cannot rely on the TCP socket
+	// alone because postgres creates the socket before it's actually ready
+	// to service requests.
+	for {
+		fixture.db, err = NewDatabase("test", "password", 5432)
+		if err == nil {
+			break
+		}
+		time.Sleep(50 * time.Millisecond)
+	}
+	log.Println("Connected to postgres.")
+
+	return fixture
 }
 
 func TestAddToMatchDB(t *testing.T) {
-	db := createDatabase(t)
-	defer db.Delete()
+	fixture := createDatabase(t)
+	defer fixture.TearDown()
 
 	correct := []Match{
 		Match{
@@ -40,10 +71,10 @@
 		},
 	}
 
-	err := db.AddToMatch(correct[0])
+	err := fixture.db.AddToMatch(correct[0])
 	check(t, err, "Failed to add match data")
 
-	got, err := db.ReturnMatches()
+	got, err := fixture.db.ReturnMatches()
 	check(t, err, "Failed ReturnMatches()")
 
 	if !reflect.DeepEqual(correct, got) {
@@ -52,8 +83,8 @@
 }
 
 func TestAddToStatsDB(t *testing.T) {
-	db := createDatabase(t)
-	defer db.Delete()
+	fixture := createDatabase(t)
+	defer fixture.TearDown()
 
 	correct := []Stats{
 		Stats{
@@ -94,18 +125,19 @@
 		},
 	}
 
-	err := db.AddToMatch(Match{
+	err := fixture.db.AddToMatch(Match{
 		MatchNumber: 7, Round: 1, CompLevel: "quals",
 		R1: 1236, R2: 1001, R3: 777, B1: 1000, B2: 4321, B3: 1234,
-		r1ID: 1, r2ID: 2, r3ID: 3, b1ID: 4, b2ID: 5, b3ID: 6})
+		r1ID: 1, r2ID: 2, r3ID: 3, b1ID: 4, b2ID: 5, b3ID: 6,
+	})
 	check(t, err, "Failed to add match")
 
 	for i := 0; i < len(correct); i++ {
-		err = db.AddToStats(correct[i])
+		err = fixture.db.AddToStats(correct[i])
 		check(t, err, "Failed to add stats to DB")
 	}
 
-	got, err := db.ReturnStats()
+	got, err := fixture.db.ReturnStats()
 	check(t, err, "Failed ReturnStats()")
 
 	if !reflect.DeepEqual(correct, got) {
@@ -114,8 +146,8 @@
 }
 
 func TestQueryMatchDB(t *testing.T) {
-	db := createDatabase(t)
-	defer db.Delete()
+	fixture := createDatabase(t)
+	defer fixture.TearDown()
 
 	testDatabase := []Match{
 		Match{MatchNumber: 2, Round: 1, CompLevel: "quals", R1: 251, R2: 169, R3: 286, B1: 253, B2: 538, B3: 149},
@@ -125,7 +157,7 @@
 	}
 
 	for i := 0; i < len(testDatabase); i++ {
-		err := db.AddToMatch(testDatabase[i])
+		err := fixture.db.AddToMatch(testDatabase[i])
 		check(t, err, fmt.Sprint("Failed to add match", i))
 	}
 
@@ -142,7 +174,7 @@
 		},
 	}
 
-	got, err := db.QueryMatches(538)
+	got, err := fixture.db.QueryMatches(538)
 	check(t, err, "Failed to query matches for 538")
 
 	if !reflect.DeepEqual(correct, got) {
@@ -151,8 +183,8 @@
 }
 
 func TestQueryStatsDB(t *testing.T) {
-	db := createDatabase(t)
-	defer db.Delete()
+	fixture := createDatabase(t)
+	defer fixture.TearDown()
 
 	testDatabase := []Stats{
 		Stats{
@@ -192,13 +224,13 @@
 		},
 	}
 
-	err := db.AddToMatch(Match{
+	err := fixture.db.AddToMatch(Match{
 		MatchNumber: 94, Round: 1, CompLevel: "quals",
 		R1: 1235, R2: 1234, R3: 1233, B1: 1232, B2: 1231, B3: 1239})
 	check(t, err, "Failed to add match")
 
 	for i := 0; i < len(testDatabase); i++ {
-		err = db.AddToStats(testDatabase[i])
+		err = fixture.db.AddToStats(testDatabase[i])
 		check(t, err, fmt.Sprint("Failed to add stats", i))
 	}
 
@@ -211,7 +243,7 @@
 		},
 	}
 
-	got, err := db.QueryStats(1235)
+	got, err := fixture.db.QueryStats(1235)
 	check(t, err, "Failed QueryStats()")
 
 	if !reflect.DeepEqual(correct, got) {
@@ -220,8 +252,8 @@
 }
 
 func TestReturnMatchDB(t *testing.T) {
-	db := createDatabase(t)
-	defer db.Delete()
+	fixture := createDatabase(t)
+	defer fixture.TearDown()
 
 	correct := []Match{
 		Match{
@@ -252,11 +284,11 @@
 	}
 
 	for i := 0; i < len(correct); i++ {
-		err := db.AddToMatch(correct[i])
+		err := fixture.db.AddToMatch(correct[i])
 		check(t, err, fmt.Sprint("Failed to add match", i))
 	}
 
-	got, err := db.ReturnMatches()
+	got, err := fixture.db.ReturnMatches()
 	check(t, err, "Failed ReturnMatches()")
 
 	if !reflect.DeepEqual(correct, got) {
@@ -265,8 +297,8 @@
 }
 
 func TestReturnStatsDB(t *testing.T) {
-	db := createDatabase(t)
-	defer db.Delete()
+	fixture := createDatabase(t)
+	defer fixture.TearDown()
 
 	correct := []Stats{
 		Stats{
@@ -307,17 +339,17 @@
 		},
 	}
 
-	err := db.AddToMatch(Match{
+	err := fixture.db.AddToMatch(Match{
 		MatchNumber: 94, Round: 1, CompLevel: "quals",
 		R1: 1235, R2: 1236, R3: 1237, B1: 1238, B2: 1239, B3: 1233})
 	check(t, err, "Failed to add match")
 
 	for i := 0; i < len(correct); i++ {
-		err = db.AddToStats(correct[i])
+		err = fixture.db.AddToStats(correct[i])
 		check(t, err, fmt.Sprint("Failed to add stats", i))
 	}
 
-	got, err := db.ReturnStats()
+	got, err := fixture.db.ReturnStats()
 	check(t, err, "Failed ReturnStats()")
 
 	if !reflect.DeepEqual(correct, got) {
@@ -326,22 +358,22 @@
 }
 
 func TestNotes(t *testing.T) {
-	db := createDatabase(t)
-	defer db.Delete()
+	fixture := createDatabase(t)
+	defer fixture.TearDown()
 
 	expected := NotesData{
 		TeamNumber: 1234,
 		Notes:      []string{"Note 1", "Note 3"},
 	}
 
-	err := db.AddNotes(NotesData{1234, []string{"Note 1"}})
+	err := fixture.db.AddNotes(NotesData{1234, []string{"Note 1"}})
 	check(t, err, "Failed to add Note")
-	err = db.AddNotes(NotesData{1235, []string{"Note 2"}})
+	err = fixture.db.AddNotes(NotesData{1235, []string{"Note 2"}})
 	check(t, err, "Failed to add Note")
-	err = db.AddNotes(NotesData{1234, []string{"Note 3"}})
+	err = fixture.db.AddNotes(NotesData{1234, []string{"Note 3"}})
 	check(t, err, "Failed to add Note")
 
-	actual, err := db.QueryNotes(1234)
+	actual, err := fixture.db.QueryNotes(1234)
 	check(t, err, "Failed to get Notes")
 
 	if !reflect.DeepEqual(expected, actual) {
diff --git a/scouting/db/testdb_server/BUILD b/scouting/db/testdb_server/BUILD
new file mode 100644
index 0000000..881d189
--- /dev/null
+++ b/scouting/db/testdb_server/BUILD
@@ -0,0 +1,22 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
+
+go_library(
+    name = "testdb_server_lib",
+    srcs = ["main.go"],
+    importpath = "github.com/frc971/971-Robot-Code/scouting/db/testdb_server",
+    target_compatible_with = ["@platforms//cpu:x86_64"],
+    visibility = ["//visibility:private"],
+    deps = ["@com_github_phst_runfiles//:go_default_library"],
+)
+
+go_binary(
+    name = "testdb_server",
+    data = [
+        "postgres_test.conf",
+        "@postgresql_amd64//:initdb",
+        "@postgresql_amd64//:postgres",
+    ],
+    embed = [":testdb_server_lib"],
+    target_compatible_with = ["@platforms//cpu:x86_64"],
+    visibility = ["//visibility:public"],
+)
diff --git a/scouting/db/testdb_server/main.go b/scouting/db/testdb_server/main.go
new file mode 100644
index 0000000..ecb118f
--- /dev/null
+++ b/scouting/db/testdb_server/main.go
@@ -0,0 +1,118 @@
+// This binary starts up a postgres server in the background.
+//
+// The server will be reachable at localhost:5432 with username and password of
+// "test" and "password", respectively.
+
+package main
+
+import (
+	"flag"
+	"fmt"
+	"io/ioutil"
+	"log"
+	"os"
+	"os/exec"
+	"os/signal"
+	"path/filepath"
+	"strconv"
+	"strings"
+	"syscall"
+
+	"github.com/phst/runfiles"
+)
+
+func check(err error, message string) {
+	if err != nil {
+		log.Fatal(message, ": ", err)
+	}
+}
+
+// Loads the runfiles environment variables so that subprocesses can access
+// their own runfiles properly.
+func loadRunfilesEnvironment() {
+	values, err := runfiles.Env()
+	check(err, "Failed to retrieve runfiles environment")
+	for _, value := range values {
+		parts := strings.SplitN(value, "=", 2)
+		if len(parts) != 2 {
+			log.Fatalf("Failed to split \"%s\" on \"=\".", value)
+		}
+		err = os.Setenv(parts[0], parts[1])
+		check(err, "Failed to set environment "+value)
+	}
+}
+
+func getRunfile(path string) string {
+	result, err := runfiles.Path(path)
+	check(err, fmt.Sprint("Failed to find runfile path for ", path))
+	return result
+}
+
+func copyTestConfig(sourceFile, destinationFile string, port int, socketDir string) {
+	input, err := ioutil.ReadFile(sourceFile)
+	check(err, fmt.Sprint("Failed to read from ", sourceFile))
+
+	config := strings.ReplaceAll(string(input), "{POSTGRES_PORT}", strconv.Itoa(port))
+	config = strings.ReplaceAll(config, "{POSTGRES_UNIX_SOCKET_DIR}", socketDir)
+
+	err = ioutil.WriteFile(destinationFile, []byte(config), 0644)
+	check(err, fmt.Sprint("Failed to write to ", destinationFile))
+}
+
+func main() {
+	portPtr := flag.Int("port", 5432, "The port number to bind to.")
+	flag.Parse()
+
+	loadRunfilesEnvironment()
+
+	// Set up temporary directories for postgres. These cannot live in
+	// TEST_TMPDIR because socket paths have a maximum of 107 bytes.
+	tmpdir, err := ioutil.TempDir("", "testdb_server")
+	check(err, "Failed to create tmpdir")
+	defer os.RemoveAll(tmpdir)
+
+	passwordPath := filepath.Join(tmpdir, "password.txt")
+	d1 := []byte("password\n")
+	err = os.WriteFile(passwordPath, d1, 0644)
+	check(err, "Failed to create password file")
+
+	dbDir := filepath.Join(tmpdir, "db")
+	initdb := exec.Command(
+		getRunfile("postgresql_amd64/initdb"),
+		"-D", dbDir,
+		"--username=test", "--pwfile="+passwordPath)
+	initdb.Stdout = os.Stdout
+	initdb.Stderr = os.Stderr
+	err = initdb.Run()
+	check(err, "Failed to run initdb")
+
+	// Set up a directory for postgres to put its socket file.
+	socketDir := filepath.Join(tmpdir, "postgres_socket")
+	err = os.MkdirAll(socketDir, 0755)
+	check(err, "Failed to create socket directory "+socketDir)
+
+	copyTestConfig(
+		getRunfile("org_frc971/scouting/db/testdb_server/postgres_test.conf"),
+		filepath.Join(dbDir, "postgresql.conf"),
+		*portPtr,
+		socketDir)
+
+	log.Println("Starting up postgres.")
+	server := exec.Command(getRunfile("postgresql_amd64/postgres"), "-D", dbDir)
+	server.Stdout = os.Stdout
+	server.Stderr = os.Stderr
+	err = server.Start()
+	check(err, "Failed to run postgres")
+	defer func() {
+		log.Println("Shutting down postgres")
+		server.Process.Signal(os.Interrupt)
+		server.Process.Wait()
+	}()
+
+	// Block until the user hits Ctrl-C.
+	sigint := make(chan os.Signal, 1)
+	signal.Notify(sigint, syscall.SIGTERM)
+	signal.Notify(sigint, syscall.SIGINT)
+	fmt.Println("Waiting for CTRL-C or SIGINT.")
+	<-sigint
+}
diff --git a/scouting/db/testdb_server/postgres_test.conf b/scouting/db/testdb_server/postgres_test.conf
new file mode 100644
index 0000000..119e4d0
--- /dev/null
+++ b/scouting/db/testdb_server/postgres_test.conf
@@ -0,0 +1,782 @@
+# -----------------------------
+# PostgreSQL configuration file
+# -----------------------------
+#
+# This file consists of lines of the form:
+#
+#   name = value
+#
+# (The "=" is optional.)  Whitespace may be used.  Comments are introduced with
+# "#" anywhere on a line.  The complete list of parameter names and allowed
+# values can be found in the PostgreSQL documentation.
+#
+# The commented-out settings shown in this file represent the default values.
+# Re-commenting a setting is NOT sufficient to revert it to the default value;
+# you need to reload the server.
+#
+# This file is read on server startup and when the server receives a SIGHUP
+# signal.  If you edit the file on a running system, you have to SIGHUP the
+# server for the changes to take effect, run "pg_ctl reload", or execute
+# "SELECT pg_reload_conf()".  Some parameters, which are marked below,
+# require a server shutdown and restart to take effect.
+#
+# Any parameter can also be given as a command-line option to the server, e.g.,
+# "postgres -c log_connections=on".  Some parameters can be changed at run time
+# with the "SET" SQL command.
+#
+# Memory units:  B  = bytes            Time units:  us  = microseconds
+#                kB = kilobytes                     ms  = milliseconds
+#                MB = megabytes                     s   = seconds
+#                GB = gigabytes                     min = minutes
+#                TB = terabytes                     h   = hours
+#                                                   d   = days
+
+
+#------------------------------------------------------------------------------
+# FILE LOCATIONS
+#------------------------------------------------------------------------------
+
+# The default values of these variables are driven from the -D command-line
+# option or PGDATA environment variable, represented here as ConfigDir.
+
+#data_directory = 'ConfigDir'		# use data in another directory
+					# (change requires restart)
+#hba_file = 'ConfigDir/pg_hba.conf'	# host-based authentication file
+					# (change requires restart)
+#ident_file = 'ConfigDir/pg_ident.conf'	# ident configuration file
+					# (change requires restart)
+
+# If external_pid_file is not explicitly set, no extra PID file is written.
+#external_pid_file = ''			# write an extra PID file
+					# (change requires restart)
+
+
+#------------------------------------------------------------------------------
+# CONNECTIONS AND AUTHENTICATION
+#------------------------------------------------------------------------------
+
+# - Connection Settings -
+
+#listen_addresses = 'localhost'		# what IP address(es) to listen on;
+					# comma-separated list of addresses;
+					# defaults to 'localhost'; use '*' for all
+					# (change requires restart)
+port = {POSTGRES_PORT}			# (change requires restart)
+max_connections = 100			# (change requires restart)
+#superuser_reserved_connections = 3	# (change requires restart)
+unix_socket_directories = '{POSTGRES_UNIX_SOCKET_DIR}'	# comma-separated list of directories
+					# (change requires restart)
+#unix_socket_group = ''			# (change requires restart)
+#unix_socket_permissions = 0777		# begin with 0 to use octal notation
+					# (change requires restart)
+#bonjour = off				# advertise server via Bonjour
+					# (change requires restart)
+#bonjour_name = ''			# defaults to the computer name
+					# (change requires restart)
+
+# - TCP settings -
+# see "man tcp" for details
+
+#tcp_keepalives_idle = 0		# TCP_KEEPIDLE, in seconds;
+					# 0 selects the system default
+#tcp_keepalives_interval = 0		# TCP_KEEPINTVL, in seconds;
+					# 0 selects the system default
+#tcp_keepalives_count = 0		# TCP_KEEPCNT;
+					# 0 selects the system default
+#tcp_user_timeout = 0			# TCP_USER_TIMEOUT, in milliseconds;
+					# 0 selects the system default
+
+# - Authentication -
+
+#authentication_timeout = 1min		# 1s-600s
+#password_encryption = md5		# md5 or scram-sha-256
+#db_user_namespace = off
+
+# GSSAPI using Kerberos
+#krb_server_keyfile = 'FILE:${sysconfdir}/krb5.keytab'
+#krb_caseins_users = off
+
+# - SSL -
+
+#ssl = off
+#ssl_ca_file = ''
+#ssl_cert_file = 'server.crt'
+#ssl_crl_file = ''
+#ssl_key_file = 'server.key'
+#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers
+#ssl_prefer_server_ciphers = on
+#ssl_ecdh_curve = 'prime256v1'
+#ssl_min_protocol_version = 'TLSv1.2'
+#ssl_max_protocol_version = ''
+#ssl_dh_params_file = ''
+#ssl_passphrase_command = ''
+#ssl_passphrase_command_supports_reload = off
+
+
+#------------------------------------------------------------------------------
+# RESOURCE USAGE (except WAL)
+#------------------------------------------------------------------------------
+
+# - Memory -
+
+shared_buffers = 128MB			# min 128kB
+					# (change requires restart)
+#huge_pages = try			# on, off, or try
+					# (change requires restart)
+#temp_buffers = 8MB			# min 800kB
+#max_prepared_transactions = 0		# zero disables the feature
+					# (change requires restart)
+# Caution: it is not advisable to set max_prepared_transactions nonzero unless
+# you actively intend to use prepared transactions.
+#work_mem = 4MB				# min 64kB
+#hash_mem_multiplier = 1.0		# 1-1000.0 multiplier on hash table work_mem
+#maintenance_work_mem = 64MB		# min 1MB
+#autovacuum_work_mem = -1		# min 1MB, or -1 to use maintenance_work_mem
+#logical_decoding_work_mem = 64MB	# min 64kB
+#max_stack_depth = 2MB			# min 100kB
+#shared_memory_type = mmap		# the default is the first option
+					# supported by the operating system:
+					#   mmap
+					#   sysv
+					#   windows
+					# (change requires restart)
+dynamic_shared_memory_type = posix	# the default is the first option
+					# supported by the operating system:
+					#   posix
+					#   sysv
+					#   windows
+					#   mmap
+					# (change requires restart)
+
+# - Disk -
+
+#temp_file_limit = -1			# limits per-process temp file space
+					# in kilobytes, or -1 for no limit
+
+# - Kernel Resources -
+
+#max_files_per_process = 1000		# min 64
+					# (change requires restart)
+
+# - Cost-Based Vacuum Delay -
+
+#vacuum_cost_delay = 0			# 0-100 milliseconds (0 disables)
+#vacuum_cost_page_hit = 1		# 0-10000 credits
+#vacuum_cost_page_miss = 10		# 0-10000 credits
+#vacuum_cost_page_dirty = 20		# 0-10000 credits
+#vacuum_cost_limit = 200		# 1-10000 credits
+
+# - Background Writer -
+
+#bgwriter_delay = 200ms			# 10-10000ms between rounds
+#bgwriter_lru_maxpages = 100		# max buffers written/round, 0 disables
+#bgwriter_lru_multiplier = 2.0		# 0-10.0 multiplier on buffers scanned/round
+#bgwriter_flush_after = 512kB		# measured in pages, 0 disables
+
+# - Asynchronous Behavior -
+
+#effective_io_concurrency = 1		# 1-1000; 0 disables prefetching
+#maintenance_io_concurrency = 10	# 1-1000; 0 disables prefetching
+#max_worker_processes = 8		# (change requires restart)
+#max_parallel_maintenance_workers = 2	# taken from max_parallel_workers
+#max_parallel_workers_per_gather = 2	# taken from max_parallel_workers
+#parallel_leader_participation = on
+#max_parallel_workers = 8		# maximum number of max_worker_processes that
+					# can be used in parallel operations
+#old_snapshot_threshold = -1		# 1min-60d; -1 disables; 0 is immediate
+					# (change requires restart)
+#backend_flush_after = 0		# measured in pages, 0 disables
+
+
+#------------------------------------------------------------------------------
+# WRITE-AHEAD LOG
+#------------------------------------------------------------------------------
+
+# - Settings -
+
+#wal_level = replica			# minimal, replica, or logical
+					# (change requires restart)
+#fsync = on				# flush data to disk for crash safety
+					# (turning this off can cause
+					# unrecoverable data corruption)
+#synchronous_commit = on		# synchronization level;
+					# off, local, remote_write, remote_apply, or on
+#wal_sync_method = fsync		# the default is the first option
+					# supported by the operating system:
+					#   open_datasync
+					#   fdatasync (default on Linux and FreeBSD)
+					#   fsync
+					#   fsync_writethrough
+					#   open_sync
+#full_page_writes = on			# recover from partial page writes
+#wal_compression = off			# enable compression of full-page writes
+#wal_log_hints = off			# also do full page writes of non-critical updates
+					# (change requires restart)
+#wal_init_zero = on			# zero-fill new WAL files
+#wal_recycle = on			# recycle WAL files
+#wal_buffers = -1			# min 32kB, -1 sets based on shared_buffers
+					# (change requires restart)
+#wal_writer_delay = 200ms		# 1-10000 milliseconds
+#wal_writer_flush_after = 1MB		# measured in pages, 0 disables
+#wal_skip_threshold = 2MB
+
+#commit_delay = 0			# range 0-100000, in microseconds
+#commit_siblings = 5			# range 1-1000
+
+# - Checkpoints -
+
+#checkpoint_timeout = 5min		# range 30s-1d
+max_wal_size = 1GB
+min_wal_size = 80MB
+#checkpoint_completion_target = 0.5	# checkpoint target duration, 0.0 - 1.0
+#checkpoint_flush_after = 256kB		# measured in pages, 0 disables
+#checkpoint_warning = 30s		# 0 disables
+
+# - Archiving -
+
+#archive_mode = off		# enables archiving; off, on, or always
+				# (change requires restart)
+#archive_command = ''		# command to use to archive a logfile segment
+				# placeholders: %p = path of file to archive
+				#               %f = file name only
+				# e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f'
+#archive_timeout = 0		# force a logfile segment switch after this
+				# number of seconds; 0 disables
+
+# - Archive Recovery -
+
+# These are only used in recovery mode.
+
+#restore_command = ''		# command to use to restore an archived logfile segment
+				# placeholders: %p = path of file to restore
+				#               %f = file name only
+				# e.g. 'cp /mnt/server/archivedir/%f %p'
+				# (change requires restart)
+#archive_cleanup_command = ''	# command to execute at every restartpoint
+#recovery_end_command = ''	# command to execute at completion of recovery
+
+# - Recovery Target -
+
+# Set these only when performing a targeted recovery.
+
+#recovery_target = ''		# 'immediate' to end recovery as soon as a
+                                # consistent state is reached
+				# (change requires restart)
+#recovery_target_name = ''	# the named restore point to which recovery will proceed
+				# (change requires restart)
+#recovery_target_time = ''	# the time stamp up to which recovery will proceed
+				# (change requires restart)
+#recovery_target_xid = ''	# the transaction ID up to which recovery will proceed
+				# (change requires restart)
+#recovery_target_lsn = ''	# the WAL LSN up to which recovery will proceed
+				# (change requires restart)
+#recovery_target_inclusive = on # Specifies whether to stop:
+				# just after the specified recovery target (on)
+				# just before the recovery target (off)
+				# (change requires restart)
+#recovery_target_timeline = 'latest'	# 'current', 'latest', or timeline ID
+				# (change requires restart)
+#recovery_target_action = 'pause'	# 'pause', 'promote', 'shutdown'
+				# (change requires restart)
+
+
+#------------------------------------------------------------------------------
+# REPLICATION
+#------------------------------------------------------------------------------
+
+# - Sending Servers -
+
+# Set these on the master and on any standby that will send replication data.
+
+#max_wal_senders = 10		# max number of walsender processes
+				# (change requires restart)
+#wal_keep_size = 0		# in megabytes; 0 disables
+#max_slot_wal_keep_size = -1	# in megabytes; -1 disables
+#wal_sender_timeout = 60s	# in milliseconds; 0 disables
+
+#max_replication_slots = 10	# max number of replication slots
+				# (change requires restart)
+#track_commit_timestamp = off	# collect timestamp of transaction commit
+				# (change requires restart)
+
+# - Master Server -
+
+# These settings are ignored on a standby server.
+
+#synchronous_standby_names = ''	# standby servers that provide sync rep
+				# method to choose sync standbys, number of sync standbys,
+				# and comma-separated list of application_name
+				# from standby(s); '*' = all
+#vacuum_defer_cleanup_age = 0	# number of xacts by which cleanup is delayed
+
+# - Standby Servers -
+
+# These settings are ignored on a master server.
+
+#primary_conninfo = ''			# connection string to sending server
+#primary_slot_name = ''			# replication slot on sending server
+#promote_trigger_file = ''		# file name whose presence ends recovery
+#hot_standby = on			# "off" disallows queries during recovery
+					# (change requires restart)
+#max_standby_archive_delay = 30s	# max delay before canceling queries
+					# when reading WAL from archive;
+					# -1 allows indefinite delay
+#max_standby_streaming_delay = 30s	# max delay before canceling queries
+					# when reading streaming WAL;
+					# -1 allows indefinite delay
+#wal_receiver_create_temp_slot = off	# create temp slot if primary_slot_name
+					# is not set
+#wal_receiver_status_interval = 10s	# send replies at least this often
+					# 0 disables
+#hot_standby_feedback = off		# send info from standby to prevent
+					# query conflicts
+#wal_receiver_timeout = 60s		# time that receiver waits for
+					# communication from master
+					# in milliseconds; 0 disables
+#wal_retrieve_retry_interval = 5s	# time to wait before retrying to
+					# retrieve WAL after a failed attempt
+#recovery_min_apply_delay = 0		# minimum delay for applying changes during recovery
+
+# - Subscribers -
+
+# These settings are ignored on a publisher.
+
+#max_logical_replication_workers = 4	# taken from max_worker_processes
+					# (change requires restart)
+#max_sync_workers_per_subscription = 2	# taken from max_logical_replication_workers
+
+
+#------------------------------------------------------------------------------
+# QUERY TUNING
+#------------------------------------------------------------------------------
+
+# - Planner Method Configuration -
+
+#enable_bitmapscan = on
+#enable_hashagg = on
+#enable_hashjoin = on
+#enable_indexscan = on
+#enable_indexonlyscan = on
+#enable_material = on
+#enable_mergejoin = on
+#enable_nestloop = on
+#enable_parallel_append = on
+#enable_seqscan = on
+#enable_sort = on
+#enable_incremental_sort = on
+#enable_tidscan = on
+#enable_partitionwise_join = off
+#enable_partitionwise_aggregate = off
+#enable_parallel_hash = on
+#enable_partition_pruning = on
+
+# - Planner Cost Constants -
+
+#seq_page_cost = 1.0			# measured on an arbitrary scale
+#random_page_cost = 4.0			# same scale as above
+#cpu_tuple_cost = 0.01			# same scale as above
+#cpu_index_tuple_cost = 0.005		# same scale as above
+#cpu_operator_cost = 0.0025		# same scale as above
+#parallel_tuple_cost = 0.1		# same scale as above
+#parallel_setup_cost = 1000.0	# same scale as above
+
+#jit_above_cost = 100000		# perform JIT compilation if available
+					# and query more expensive than this;
+					# -1 disables
+#jit_inline_above_cost = 500000		# inline small functions if query is
+					# more expensive than this; -1 disables
+#jit_optimize_above_cost = 500000	# use expensive JIT optimizations if
+					# query is more expensive than this;
+					# -1 disables
+
+#min_parallel_table_scan_size = 8MB
+#min_parallel_index_scan_size = 512kB
+#effective_cache_size = 4GB
+
+# - Genetic Query Optimizer -
+
+#geqo = on
+#geqo_threshold = 12
+#geqo_effort = 5			# range 1-10
+#geqo_pool_size = 0			# selects default based on effort
+#geqo_generations = 0			# selects default based on effort
+#geqo_selection_bias = 2.0		# range 1.5-2.0
+#geqo_seed = 0.0			# range 0.0-1.0
+
+# - Other Planner Options -
+
+#default_statistics_target = 100	# range 1-10000
+#constraint_exclusion = partition	# on, off, or partition
+#cursor_tuple_fraction = 0.1		# range 0.0-1.0
+#from_collapse_limit = 8
+#join_collapse_limit = 8		# 1 disables collapsing of explicit
+					# JOIN clauses
+#force_parallel_mode = off
+#jit = on				# allow JIT compilation
+#plan_cache_mode = auto			# auto, force_generic_plan or
+					# force_custom_plan
+
+
+#------------------------------------------------------------------------------
+# REPORTING AND LOGGING
+#------------------------------------------------------------------------------
+
+# - Where to Log -
+
+#log_destination = 'stderr'		# Valid values are combinations of
+					# stderr, csvlog, syslog, and eventlog,
+					# depending on platform.  csvlog
+					# requires logging_collector to be on.
+
+# This is used when logging to stderr:
+#logging_collector = off		# Enable capturing of stderr and csvlog
+					# into log files. Required to be on for
+					# csvlogs.
+					# (change requires restart)
+
+# These are only used if logging_collector is on:
+#log_directory = 'log'			# directory where log files are written,
+					# can be absolute or relative to PGDATA
+#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'	# log file name pattern,
+					# can include strftime() escapes
+#log_file_mode = 0600			# creation mode for log files,
+					# begin with 0 to use octal notation
+#log_truncate_on_rotation = off		# If on, an existing log file with the
+					# same name as the new log file will be
+					# truncated rather than appended to.
+					# But such truncation only occurs on
+					# time-driven rotation, not on restarts
+					# or size-driven rotation.  Default is
+					# off, meaning append to existing files
+					# in all cases.
+#log_rotation_age = 1d			# Automatic rotation of logfiles will
+					# happen after that time.  0 disables.
+#log_rotation_size = 10MB		# Automatic rotation of logfiles will
+					# happen after that much log output.
+					# 0 disables.
+
+# These are relevant when logging to syslog:
+#syslog_facility = 'LOCAL0'
+#syslog_ident = 'postgres'
+#syslog_sequence_numbers = on
+#syslog_split_messages = on
+
+# This is only relevant when logging to eventlog (win32):
+# (change requires restart)
+#event_source = 'PostgreSQL'
+
+# - When to Log -
+
+#log_min_messages = warning		# values in order of decreasing detail:
+					#   debug5
+					#   debug4
+					#   debug3
+					#   debug2
+					#   debug1
+					#   info
+					#   notice
+					#   warning
+					#   error
+					#   log
+					#   fatal
+					#   panic
+
+#log_min_error_statement = error	# values in order of decreasing detail:
+					#   debug5
+					#   debug4
+					#   debug3
+					#   debug2
+					#   debug1
+					#   info
+					#   notice
+					#   warning
+					#   error
+					#   log
+					#   fatal
+					#   panic (effectively off)
+
+#log_min_duration_statement = -1	# -1 is disabled, 0 logs all statements
+					# and their durations, > 0 logs only
+					# statements running at least this number
+					# of milliseconds
+
+#log_min_duration_sample = -1		# -1 is disabled, 0 logs a sample of statements
+					# and their durations, > 0 logs only a sample of
+					# statements running at least this number
+					# of milliseconds;
+					# sample fraction is determined by log_statement_sample_rate
+
+#log_statement_sample_rate = 1.0	# fraction of logged statements exceeding
+					# log_min_duration_sample to be logged;
+					# 1.0 logs all such statements, 0.0 never logs
+
+
+#log_transaction_sample_rate = 0.0	# fraction of transactions whose statements
+					# are logged regardless of their duration; 1.0 logs all
+					# statements from all transactions, 0.0 never logs
+
+# - What to Log -
+
+#debug_print_parse = off
+#debug_print_rewritten = off
+#debug_print_plan = off
+#debug_pretty_print = on
+#log_checkpoints = off
+#log_connections = off
+#log_disconnections = off
+#log_duration = off
+#log_error_verbosity = default		# terse, default, or verbose messages
+#log_hostname = off
+#log_line_prefix = '%m [%p] '		# special values:
+					#   %a = application name
+					#   %u = user name
+					#   %d = database name
+					#   %r = remote host and port
+					#   %h = remote host
+					#   %b = backend type
+					#   %p = process ID
+					#   %t = timestamp without milliseconds
+					#   %m = timestamp with milliseconds
+					#   %n = timestamp with milliseconds (as a Unix epoch)
+					#   %i = command tag
+					#   %e = SQL state
+					#   %c = session ID
+					#   %l = session line number
+					#   %s = session start timestamp
+					#   %v = virtual transaction ID
+					#   %x = transaction ID (0 if none)
+					#   %q = stop here in non-session
+					#        processes
+					#   %% = '%'
+					# e.g. '<%u%%%d> '
+#log_lock_waits = off			# log lock waits >= deadlock_timeout
+#log_parameter_max_length = -1		# when logging statements, limit logged
+					# bind-parameter values to N bytes;
+					# -1 means print in full, 0 disables
+#log_parameter_max_length_on_error = 0	# when logging an error, limit logged
+					# bind-parameter values to N bytes;
+					# -1 means print in full, 0 disables
+#log_statement = 'none'			# none, ddl, mod, all
+#log_replication_commands = off
+#log_temp_files = -1			# log temporary files equal or larger
+					# than the specified size in kilobytes;
+					# -1 disables, 0 logs all temp files
+log_timezone = 'America/Los_Angeles'
+
+#------------------------------------------------------------------------------
+# PROCESS TITLE
+#------------------------------------------------------------------------------
+
+#cluster_name = ''			# added to process titles if nonempty
+					# (change requires restart)
+#update_process_title = on
+
+
+#------------------------------------------------------------------------------
+# STATISTICS
+#------------------------------------------------------------------------------
+
+# - Query and Index Statistics Collector -
+
+#track_activities = on
+#track_counts = on
+#track_io_timing = off
+#track_functions = none			# none, pl, all
+#track_activity_query_size = 1024	# (change requires restart)
+#stats_temp_directory = 'pg_stat_tmp'
+
+
+# - Monitoring -
+
+#log_parser_stats = off
+#log_planner_stats = off
+#log_executor_stats = off
+#log_statement_stats = off
+
+
+#------------------------------------------------------------------------------
+# AUTOVACUUM
+#------------------------------------------------------------------------------
+
+#autovacuum = on			# Enable autovacuum subprocess?  'on'
+					# requires track_counts to also be on.
+#log_autovacuum_min_duration = -1	# -1 disables, 0 logs all actions and
+					# their durations, > 0 logs only
+					# actions running at least this number
+					# of milliseconds.
+#autovacuum_max_workers = 3		# max number of autovacuum subprocesses
+					# (change requires restart)
+#autovacuum_naptime = 1min		# time between autovacuum runs
+#autovacuum_vacuum_threshold = 50	# min number of row updates before
+					# vacuum
+#autovacuum_vacuum_insert_threshold = 1000	# min number of row inserts
+					# before vacuum; -1 disables insert
+					# vacuums
+#autovacuum_analyze_threshold = 50	# min number of row updates before
+					# analyze
+#autovacuum_vacuum_scale_factor = 0.2	# fraction of table size before vacuum
+#autovacuum_vacuum_insert_scale_factor = 0.2	# fraction of inserts over table
+					# size before insert vacuum
+#autovacuum_analyze_scale_factor = 0.1	# fraction of table size before analyze
+#autovacuum_freeze_max_age = 200000000	# maximum XID age before forced vacuum
+					# (change requires restart)
+#autovacuum_multixact_freeze_max_age = 400000000	# maximum multixact age
+					# before forced vacuum
+					# (change requires restart)
+#autovacuum_vacuum_cost_delay = 2ms	# default vacuum cost delay for
+					# autovacuum, in milliseconds;
+					# -1 means use vacuum_cost_delay
+#autovacuum_vacuum_cost_limit = -1	# default vacuum cost limit for
+					# autovacuum, -1 means use
+					# vacuum_cost_limit
+
+
+#------------------------------------------------------------------------------
+# CLIENT CONNECTION DEFAULTS
+#------------------------------------------------------------------------------
+
+# - Statement Behavior -
+
+#client_min_messages = notice		# values in order of decreasing detail:
+					#   debug5
+					#   debug4
+					#   debug3
+					#   debug2
+					#   debug1
+					#   log
+					#   notice
+					#   warning
+					#   error
+#search_path = '"$user", public'	# schema names
+#row_security = on
+#default_tablespace = ''		# a tablespace name, '' uses the default
+#temp_tablespaces = ''			# a list of tablespace names, '' uses
+					# only default tablespace
+#default_table_access_method = 'heap'
+#check_function_bodies = on
+#default_transaction_isolation = 'read committed'
+#default_transaction_read_only = off
+#default_transaction_deferrable = off
+#session_replication_role = 'origin'
+#statement_timeout = 0			# in milliseconds, 0 is disabled
+#lock_timeout = 0			# in milliseconds, 0 is disabled
+#idle_in_transaction_session_timeout = 0	# in milliseconds, 0 is disabled
+#vacuum_freeze_min_age = 50000000
+#vacuum_freeze_table_age = 150000000
+#vacuum_multixact_freeze_min_age = 5000000
+#vacuum_multixact_freeze_table_age = 150000000
+#vacuum_cleanup_index_scale_factor = 0.1	# fraction of total number of tuples
+						# before index cleanup, 0 always performs
+						# index cleanup
+#bytea_output = 'hex'			# hex, escape
+#xmlbinary = 'base64'
+#xmloption = 'content'
+#gin_fuzzy_search_limit = 0
+#gin_pending_list_limit = 4MB
+
+# - Locale and Formatting -
+
+datestyle = 'iso, mdy'
+#intervalstyle = 'postgres'
+timezone = 'America/Los_Angeles'
+#timezone_abbreviations = 'Default'     # Select the set of available time zone
+					# abbreviations.  Currently, there are
+					#   Default
+					#   Australia (historical usage)
+					#   India
+					# You can create your own file in
+					# share/timezonesets/.
+#extra_float_digits = 1			# min -15, max 3; any value >0 actually
+					# selects precise output mode
+#client_encoding = sql_ascii		# actually, defaults to database
+					# encoding
+
+# These settings are initialized by initdb, but they can be changed.
+lc_messages = 'en_US.UTF-8'			# locale for system error message
+					# strings
+lc_monetary = 'en_US.UTF-8'			# locale for monetary formatting
+lc_numeric = 'en_US.UTF-8'			# locale for number formatting
+lc_time = 'en_US.UTF-8'				# locale for time formatting
+
+# default configuration for text search
+default_text_search_config = 'pg_catalog.english'
+
+# - Shared Library Preloading -
+
+#shared_preload_libraries = ''	# (change requires restart)
+#local_preload_libraries = ''
+#session_preload_libraries = ''
+#jit_provider = 'llvmjit'		# JIT library to use
+
+# - Other Defaults -
+
+#dynamic_library_path = '$libdir'
+#extension_destdir = ''			# prepend path when loading extensions
+					# and shared objects (added by Debian)
+
+
+#------------------------------------------------------------------------------
+# LOCK MANAGEMENT
+#------------------------------------------------------------------------------
+
+#deadlock_timeout = 1s
+#max_locks_per_transaction = 64		# min 10
+					# (change requires restart)
+#max_pred_locks_per_transaction = 64	# min 10
+					# (change requires restart)
+#max_pred_locks_per_relation = -2	# negative values mean
+					# (max_pred_locks_per_transaction
+					#  / -max_pred_locks_per_relation) - 1
+#max_pred_locks_per_page = 2            # min 0
+
+
+#------------------------------------------------------------------------------
+# VERSION AND PLATFORM COMPATIBILITY
+#------------------------------------------------------------------------------
+
+# - Previous PostgreSQL Versions -
+
+#array_nulls = on
+#backslash_quote = safe_encoding	# on, off, or safe_encoding
+#escape_string_warning = on
+#lo_compat_privileges = off
+#operator_precedence_warning = off
+#quote_all_identifiers = off
+#standard_conforming_strings = on
+#synchronize_seqscans = on
+
+# - Other Platforms and Clients -
+
+#transform_null_equals = off
+
+
+#------------------------------------------------------------------------------
+# ERROR HANDLING
+#------------------------------------------------------------------------------
+
+#exit_on_error = off			# terminate session on any error?
+#restart_after_crash = on		# reinitialize after backend crash?
+#data_sync_retry = off			# retry or panic on failure to fsync
+					# data?
+					# (change requires restart)
+
+
+#------------------------------------------------------------------------------
+# CONFIG FILE INCLUDES
+#------------------------------------------------------------------------------
+
+# These options allow settings to be loaded from files other than the
+# default postgresql.conf.  Note that these are directives, not variable
+# assignments, so they can usefully be given more than once.
+
+#include_dir = '...'			# include files ending in '.conf' from
+					# a directory, e.g., 'conf.d'
+#include_if_exists = '...'		# include file only if it exists
+#include = '...'			# include file
+
+
+#------------------------------------------------------------------------------
+# CUSTOMIZED OPTIONS
+#------------------------------------------------------------------------------
+
+# Add settings for extensions here
diff --git a/scouting/deploy/scouting.service b/scouting/deploy/scouting.service
index 2990f42..b22a57d 100644
--- a/scouting/deploy/scouting.service
+++ b/scouting/deploy/scouting.service
@@ -9,7 +9,7 @@
 WorkingDirectory=/opt/frc971/scouting_server
 ExecStart=/opt/frc971/scouting_server/scouting/scouting \
     -port 8080 \
-    -database /var/frc971/scouting/scouting.db \
+    -db_config /var/frc971/scouting/db_config.json \
     -tba_config /var/frc971/scouting/tba_config.json
 Restart=always
 
diff --git a/scouting/testing/BUILD b/scouting/testing/BUILD
index 43bbe06..7e26763 100644
--- a/scouting/testing/BUILD
+++ b/scouting/testing/BUILD
@@ -6,6 +6,7 @@
     ],
     data = [
         "//scouting",
+        "//scouting/db/testdb_server",
         "//scouting/scraping:test_data",
     ],
     visibility = ["//visibility:public"],
diff --git a/scouting/testing/scouting_test_servers.py b/scouting/testing/scouting_test_servers.py
index 3447815..7a0d3c5 100644
--- a/scouting/testing/scouting_test_servers.py
+++ b/scouting/testing/scouting_test_servers.py
@@ -3,6 +3,7 @@
 The servers are:
  - The fake TBA server
  - The actual web server
+ - The postgres database
 """
 
 import argparse
@@ -29,6 +30,15 @@
             connection.close()
             time.sleep(0.01)
 
+def create_db_config(tmpdir: Path) -> Path:
+    config = tmpdir / "db_config.json"
+    config.write_text(json.dumps({
+        "username": "test",
+        "password": "password",
+        "port": 5432,
+    }))
+    return config
+
 def create_tba_config(tmpdir: Path) -> Path:
     # Configure the scouting webserver to scrape data from our fake TBA
     # server.
@@ -54,13 +64,19 @@
         self.tmpdir = Path(os.environ["TEST_TMPDIR"]) / "servers"
         self.tmpdir.mkdir(exist_ok=True)
 
-        db_path = self.tmpdir / "scouting.db"
+        db_config = create_db_config(self.tmpdir)
         tba_config = create_tba_config(self.tmpdir)
 
+        # The database needs to be running and addressable before the scouting
+        # webserver can start.
+        self.testdb_server = subprocess.Popen(
+            ["scouting/db/testdb_server/testdb_server_/testdb_server"])
+        wait_for_server(5432)
+
         self.webserver = subprocess.Popen([
             "scouting/scouting",
             f"--port={port}",
-            f"--database={db_path}",
+            f"--db_config={db_config}",
             f"--tba_config={tba_config}",
         ])
 
@@ -78,7 +94,7 @@
 
     def stop(self):
         """Stops the services needed for testing the scouting app."""
-        servers = (self.webserver, self.fake_tba_api)
+        servers = (self.webserver, self.testdb_server, self.fake_tba_api)
         for server in servers:
             server.terminate()
         for server in servers:
diff --git a/scouting/webserver/main.go b/scouting/webserver/main.go
index 282e248..a4d549a 100644
--- a/scouting/webserver/main.go
+++ b/scouting/webserver/main.go
@@ -1,6 +1,7 @@
 package main
 
 import (
+	"encoding/json"
 	"errors"
 	"flag"
 	"fmt"
@@ -8,8 +9,8 @@
 	"log"
 	"os"
 	"os/signal"
-	"path/filepath"
 	"syscall"
+	"time"
 
 	"github.com/frc971/971-Robot-Code/scouting/db"
 	"github.com/frc971/971-Robot-Code/scouting/scraping"
@@ -18,40 +19,88 @@
 	"github.com/frc971/971-Robot-Code/scouting/webserver/static"
 )
 
-func getDefaultDatabasePath() string {
-	// If using `bazel run`, let's create the database in the root of the
-	// workspace.
-	workspaceDir := os.Getenv("BUILD_WORKSPACE_DIRECTORY")
-	if workspaceDir != "" {
-		return filepath.Join(workspaceDir, "scouting.db")
+type DatabaseConfig struct {
+	Username string `json:"username"`
+	Password string `json:"password"`
+	Port     int    `json:"port"`
+}
+
+func readDatabaseConfig(configPath string) (*DatabaseConfig, error) {
+	content, err := ioutil.ReadFile(configPath)
+	if err != nil {
+		return nil, errors.New(fmt.Sprint("Failed to open database config at ", configPath, ": ", err))
 	}
-	// If we're inside a `bazel test`, then we will create the database in
-	// a temporary directory.
-	testTempDir := os.Getenv("TEST_TMPDIR")
-	if testTempDir != "" {
-		tempDir, err := ioutil.TempDir(testTempDir, "db")
-		if err != nil {
-			log.Fatal("Failed to create temporary directory in TEST_TMPDIR: ", err)
-		}
-		return filepath.Join(tempDir, "scouting.db")
+
+	var config DatabaseConfig
+	if err := json.Unmarshal([]byte(content), &config); err != nil {
+		return nil, errors.New(fmt.Sprint("Failed to parse database config file as JSON: ", err))
 	}
-	return filepath.Join(".", "scouting.db")
+
+	return &config, nil
 }
 
 func main() {
 	portPtr := flag.Int("port", 8080, "The port number to bind to.")
 	dirPtr := flag.String("directory", ".", "The directory to serve at /.")
-	dbPathPtr := flag.String("database", getDefaultDatabasePath(), "The path to the database.")
+	dbConfigPtr := flag.String("db_config", "",
+		"The postgres database JSON config. It needs the following keys: "+
+			"\"username\", \"password\", and \"port\". "+
+			"This option cannot be used in conjunction with -testdb_port.")
+	testDbPortPtr := flag.Int("testdb_port", 0,
+		"If set, connects to an instance of //scouting/db/testdb_server at the "+
+			"specified port. This option cannot be used in conjunction with "+
+			"-db_config.")
+	dbConnectRetries := flag.Int("db_retries", 5,
+		"The number of seconds to retry connecting to the database on startup.")
 	blueAllianceConfigPtr := flag.String("tba_config", "",
 		"The path to your The Blue Alliance JSON config. "+
 			"It needs an \"api_key\" field with your TBA API key. "+
 			"Optionally, it can have a \"base_url\" field with the TBA API base URL.")
 	flag.Parse()
 
-	database, err := db.NewDatabase(*dbPathPtr)
+	// Set up the database config. It's either specified via a JSON file on
+	// disk (-db_config) or we can generate an in-memory config when the
+	// user wants to connect to a `testdb_server` instance (-testdb_port).
+	var dbConfig *DatabaseConfig
+	var err error
+	if *dbConfigPtr != "" {
+		if *testDbPortPtr != 0 {
+			log.Fatal("Cannot specify both -db_config and -testdb_port. Choose one.")
+		}
+		dbConfig, err = readDatabaseConfig(*dbConfigPtr)
+		if err != nil {
+			log.Fatal("Failed to read ", *dbConfigPtr, ": ", err)
+		}
+	} else if *testDbPortPtr != 0 {
+		dbConfig = &DatabaseConfig{
+			Username: "test",
+			Password: "password",
+			Port:     *testDbPortPtr,
+		}
+	} else {
+		log.Fatal("Must specify one of -db_config and -testdb_port. See " +
+			"https://github.com/frc971/971-Robot-Code/blob/master/scouting/README.md " +
+			"for more information.")
+	}
+
+	// Connect to the database. It may still be starting up so we do a
+	// bunch of retries here. The number of retries can be set on the
+	// command line.
+	var database *db.Database
+	for i := 0; i < *dbConnectRetries*10; i++ {
+		database, err = db.NewDatabase(dbConfig.Username, dbConfig.Password, dbConfig.Port)
+		if err == nil {
+			break
+		}
+		if i%10 == 0 {
+			log.Println("Failed to connect to the database. Retrying in a bit.")
+		}
+		time.Sleep(1 * time.Millisecond)
+	}
 	if err != nil {
 		log.Fatal("Failed to connect to database: ", err)
 	}
+	defer database.Close()
 
 	scrapeMatchList := func(year int32, eventCode string) ([]scraping.Match, error) {
 		if *blueAllianceConfigPtr == "" {
@@ -69,7 +118,8 @@
 	// Block until the user hits Ctrl-C.
 	sigint := make(chan os.Signal, 1)
 	signal.Notify(sigint, syscall.SIGINT)
-	fmt.Println("Waiting for CTRL-C or SIGINT.")
+	signal.Notify(sigint, syscall.SIGTERM)
+	fmt.Println("Waiting for CTRL-C or SIGTERM.")
 	<-sigint
 
 	fmt.Println("Shutting down.")
diff --git a/scouting/webserver/requests/requests.go b/scouting/webserver/requests/requests.go
index 6c4bdd1..245891a 100644
--- a/scouting/webserver/requests/requests.go
+++ b/scouting/webserver/requests/requests.go
@@ -372,7 +372,7 @@
 			return
 		}
 		// Add the match to the database.
-		handler.db.AddToMatch(db.Match{
+		err = handler.db.AddToMatch(db.Match{
 			MatchNumber: int32(match.MatchNumber),
 			// TODO(phil): What does Round mean?
 			Round:     1,
@@ -384,6 +384,11 @@
 			B2:        blue[1],
 			B3:        blue[2],
 		})
+		if err != nil {
+			respondWithError(w, http.StatusInternalServerError, fmt.Sprintf(
+				"Failed to add match %d to the database: %v", match.MatchNumber, err))
+			return
+		}
 	}
 
 	var response RefreshMatchListResponseT
diff --git a/tools/go/go_mirrors.bzl b/tools/go/go_mirrors.bzl
index bfee0a9..e830d81 100644
--- a/tools/go/go_mirrors.bzl
+++ b/tools/go/go_mirrors.bzl
@@ -70,13 +70,20 @@
         "strip_prefix": "github.com/cncf/xds/go@v0.0.0-20211011173535-cb28da3451f1",
         "version": "v0.0.0-20211011173535-cb28da3451f1",
     },
-    "com_github_davecgh_go_spew": {
-        "filename": "com_github_davecgh_go_spew__v1.1.0.zip",
-        "importpath": "github.com/davecgh/go-spew",
-        "sha256": "0b5a691aeb8b6af31bd2bb640973ea7e8bf1ed9bc5889da220bf44dc06d9692c",
-        "strip_prefix": "github.com/davecgh/go-spew@v1.1.0",
+    "com_github_cockroachdb_apd": {
+        "filename": "com_github_cockroachdb_apd__v1.1.0.zip",
+        "importpath": "github.com/cockroachdb/apd",
+        "sha256": "fef7ec2fae220f84bfacb17fbfc1b04a666ab7f6fc04f3ff6d2b1e05c380777d",
+        "strip_prefix": "github.com/cockroachdb/apd@v1.1.0",
         "version": "v1.1.0",
     },
+    "com_github_davecgh_go_spew": {
+        "filename": "com_github_davecgh_go_spew__v1.1.1.zip",
+        "importpath": "github.com/davecgh/go-spew",
+        "sha256": "6b44a843951f371b7010c754ecc3cabefe815d5ced1c5b9409fb2d697e8a890d",
+        "strip_prefix": "github.com/davecgh/go-spew@v1.1.1",
+        "version": "v1.1.1",
+    },
     "com_github_envoyproxy_go_control_plane": {
         "filename": "com_github_envoyproxy_go_control_plane__v0.9.10-0.20210907150352-cf90f659a021.zip",
         "importpath": "github.com/envoyproxy/go-control-plane",
@@ -98,6 +105,13 @@
         "strip_prefix": "github.com/ghodss/yaml@v1.0.0",
         "version": "v1.0.0",
     },
+    "com_github_gofrs_uuid": {
+        "filename": "com_github_gofrs_uuid__v4.0.0+incompatible.zip",
+        "importpath": "github.com/gofrs/uuid",
+        "sha256": "8cadafda9aea197d34898d6945692173ac1d8abf3b559c4e5a59a577fc60f55e",
+        "strip_prefix": "github.com/gofrs/uuid@v4.0.0+incompatible",
+        "version": "v4.0.0+incompatible",
+    },
     "com_github_golang_glog": {
         "filename": "com_github_golang_glog__v0.0.0-20160126235308-23def4e6c14b.zip",
         "importpath": "github.com/golang/glog",
@@ -147,6 +161,27 @@
         "strip_prefix": "github.com/grpc-ecosystem/grpc-gateway@v1.16.0",
         "version": "v1.16.0",
     },
+    "com_github_jackc_fake": {
+        "filename": "com_github_jackc_fake__v0.0.0-20150926172116-812a484cc733.zip",
+        "importpath": "github.com/jackc/fake",
+        "sha256": "bf8b5b51ae03f572a70a0582dc663c5733bba9aca785d39bb0367797148e6d64",
+        "strip_prefix": "github.com/jackc/fake@v0.0.0-20150926172116-812a484cc733",
+        "version": "v0.0.0-20150926172116-812a484cc733",
+    },
+    "com_github_jackc_pgx": {
+        "filename": "com_github_jackc_pgx__v3.6.2+incompatible.zip",
+        "importpath": "github.com/jackc/pgx",
+        "sha256": "73675895baa0da97b2f0ce6e895c69b7c77ad994e30ce6a1add2abc3bb17e375",
+        "strip_prefix": "github.com/jackc/pgx@v3.6.2+incompatible",
+        "version": "v3.6.2+incompatible",
+    },
+    "com_github_lib_pq": {
+        "filename": "com_github_lib_pq__v1.10.2.zip",
+        "importpath": "github.com/lib/pq",
+        "sha256": "0f50cfc8d4ed4bbb39767aacc04d6b23e1105d2fa50dcb8e4ae204b2c90018f0",
+        "strip_prefix": "github.com/lib/pq@v1.10.2",
+        "version": "v1.10.2",
+    },
     "com_github_mattn_go_sqlite3": {
         "filename": "com_github_mattn_go_sqlite3__v1.14.10.zip",
         "importpath": "github.com/mattn/go-sqlite3",
@@ -154,6 +189,20 @@
         "strip_prefix": "github.com/mattn/go-sqlite3@v1.14.10",
         "version": "v1.14.10",
     },
+    "com_github_phst_runfiles": {
+        "filename": "com_github_phst_runfiles__v0.0.0-20220125203201-388095b3a22d.zip",
+        "importpath": "github.com/phst/runfiles",
+        "sha256": "f58f97414074227c39abce3f1b4cf8780446630b23f963232458092c126b5541",
+        "strip_prefix": "github.com/phst/runfiles@v0.0.0-20220125203201-388095b3a22d",
+        "version": "v0.0.0-20220125203201-388095b3a22d",
+    },
+    "com_github_pkg_errors": {
+        "filename": "com_github_pkg_errors__v0.8.1.zip",
+        "importpath": "github.com/pkg/errors",
+        "sha256": "4e47d021340b7396a7dee454f527552faf7360a9fc34038b1dc32ba3b5a951d8",
+        "strip_prefix": "github.com/pkg/errors@v0.8.1",
+        "version": "v0.8.1",
+    },
     "com_github_pmezard_go_difflib": {
         "filename": "com_github_pmezard_go_difflib__v1.0.0.zip",
         "importpath": "github.com/pmezard/go-difflib",
@@ -175,6 +224,13 @@
         "strip_prefix": "github.com/rogpeppe/fastuuid@v1.2.0",
         "version": "v1.2.0",
     },
+    "com_github_shopspring_decimal": {
+        "filename": "com_github_shopspring_decimal__v1.2.0.zip",
+        "importpath": "github.com/shopspring/decimal",
+        "sha256": "65c34c248e7f736cadf03a7caa0c0870d15499eb593f933fe106c96c2b7699a7",
+        "strip_prefix": "github.com/shopspring/decimal@v1.2.0",
+        "version": "v1.2.0",
+    },
     "com_github_stretchr_objx": {
         "filename": "com_github_stretchr_objx__v0.1.0.zip",
         "importpath": "github.com/stretchr/objx",
@@ -253,11 +309,11 @@
         "version": "v1.26.0",
     },
     "org_golang_x_crypto": {
-        "filename": "org_golang_x_crypto__v0.0.0-20200622213623-75b288015ac9.zip",
+        "filename": "org_golang_x_crypto__v0.0.0-20210711020723-a769d52b0f97.zip",
         "importpath": "golang.org/x/crypto",
-        "sha256": "aeaac2684d693207a90f491b0303e881e58c014e96d27b0ebb7fe6937dfc1e76",
-        "strip_prefix": "golang.org/x/crypto@v0.0.0-20200622213623-75b288015ac9",
-        "version": "v0.0.0-20200622213623-75b288015ac9",
+        "sha256": "b2b28fcf49bf385183f0369851145ddd93989f68d9e675db536a3dd482ca6d76",
+        "strip_prefix": "golang.org/x/crypto@v0.0.0-20210711020723-a769d52b0f97",
+        "version": "v0.0.0-20210711020723-a769d52b0f97",
     },
     "org_golang_x_exp": {
         "filename": "org_golang_x_exp__v0.0.0-20190121172915-509febef88a4.zip",
@@ -274,11 +330,11 @@
         "version": "v0.0.0-20190313153728-d0100b6bd8b3",
     },
     "org_golang_x_net": {
-        "filename": "org_golang_x_net__v0.0.0-20200822124328-c89045814202.zip",
+        "filename": "org_golang_x_net__v0.0.0-20210226172049-e18ecbb05110.zip",
         "importpath": "golang.org/x/net",
-        "sha256": "22ea306ad6c9100c636c165dc05a64265d0f985452a9f1edf32b561b620ae762",
-        "strip_prefix": "golang.org/x/net@v0.0.0-20200822124328-c89045814202",
-        "version": "v0.0.0-20200822124328-c89045814202",
+        "sha256": "17ae555c0bec70b583d84ec7a099db3fdc5b3b688cb2814f8c388d174e7ada15",
+        "strip_prefix": "golang.org/x/net@v0.0.0-20210226172049-e18ecbb05110",
+        "version": "v0.0.0-20210226172049-e18ecbb05110",
     },
     "org_golang_x_oauth2": {
         "filename": "org_golang_x_oauth2__v0.0.0-20200107190931-bf48bf16ab8d.zip",
@@ -295,18 +351,25 @@
         "version": "v0.0.0-20190423024810-112230192c58",
     },
     "org_golang_x_sys": {
-        "filename": "org_golang_x_sys__v0.0.0-20200323222414-85ca7c5b95cd.zip",
+        "filename": "org_golang_x_sys__v0.0.0-20210615035016-665e8c7367d1.zip",
         "importpath": "golang.org/x/sys",
-        "sha256": "d00ccd67cf0f2dd8622ed2721b8824fcbaf4f5730f47387fd5e39adbd5f6972e",
-        "strip_prefix": "golang.org/x/sys@v0.0.0-20200323222414-85ca7c5b95cd",
-        "version": "v0.0.0-20200323222414-85ca7c5b95cd",
+        "sha256": "0d25c11d65a4ac84a6e2c3bd56a6afeb1da3923d2752a5aa59b7e99a94359fcb",
+        "strip_prefix": "golang.org/x/sys@v0.0.0-20210615035016-665e8c7367d1",
+        "version": "v0.0.0-20210615035016-665e8c7367d1",
+    },
+    "org_golang_x_term": {
+        "filename": "org_golang_x_term__v0.0.0-20201126162022-7de9c90e9dd1.zip",
+        "importpath": "golang.org/x/term",
+        "sha256": "475a86f11dd148b474ce405c5dbdd5f6bcae056c3e44e52445a45926dd69a552",
+        "strip_prefix": "golang.org/x/term@v0.0.0-20201126162022-7de9c90e9dd1",
+        "version": "v0.0.0-20201126162022-7de9c90e9dd1",
     },
     "org_golang_x_text": {
-        "filename": "org_golang_x_text__v0.3.0.zip",
+        "filename": "org_golang_x_text__v0.3.6.zip",
         "importpath": "golang.org/x/text",
-        "sha256": "ea3068395503d3c7ef8ce16a286f75c8c93882c25a66c2aa6c8e2ad4da7a9ae0",
-        "strip_prefix": "golang.org/x/text@v0.3.0",
-        "version": "v0.3.0",
+        "sha256": "2afade648a4cb240afb7b3bf8e3719b615169c90d6281bd6d4ba34629c744579",
+        "strip_prefix": "golang.org/x/text@v0.3.6",
+        "version": "v0.3.6",
     },
     "org_golang_x_tools": {
         "filename": "org_golang_x_tools__v0.0.0-20190524140312-2c0ae7006135.zip",