Replace MySQL driver with pgx/v5 and pgxpool:
- Update sqlc to use postgresql engine
- Convert query.sql to PostgreSQL syntax ($1 params, CASE WHEN,
ANY() arrays)
- Replace sql.DB with pgxpool.Pool throughout
- Change nullable types from sql.Null* to pgtype.*
- Update ID types from uint32 to int64 for PostgreSQL compatibility
- Delete MySQL-specific dynamic_connect.go
- Add opentelemetry.gowrap template for tracing
GetZoneStatsData and GetZoneStatsV2's netspeed_active values can
exceed 2 billion, causing 32-bit integer overflow. Changed from
int32/uint32 to int (64-bit on modern systems) to handle large
network speed totals.
- Update sqlc column overrides to use int type
- Fix type compatibility in dnsanswers.go zoneTotals map
- Regenerate database code with new types
Fixes https://community.ntppool.org/t/error-message-displayed-on-the-monitoring-score-page/4063