Description
Noticed in #16220. This causes some db calls to fail.
2025-01-22 06:24:00.489 [erro] coderd.dbrollup: failed to rollup data ...
error= execute transaction:
github.com/coder/coder/v2/coderd/database.(*sqlQuerier).runTx
/home/runner/work/coder/coder/coderd/database/db.go:214
- pq: character with byte sequence 0xce 0xbc in encoding "UTF8" has no equivalent in encoding "WIN1252"
Can be fixed by adding .Encoding("UTF8")
when launching built-in Postgres:
Lines 2008 to 2020 in 923ef56
We already do it for the built-in Postgres we use in CI:
coder/scripts/embedded-pg/main.go
Lines 23 to 36 in 923ef56
Before implementing the fix, we need to ensure that it won't break with an existing database when an admin upgrades Coder.