Skip to content

Consider migrating away from lib/pq due do data race in context cancellation #6201

@mafredri

Description

@mafredri

The lib/pq library has served us well, but it's not very actively maintained and longstanding issues are still open.

Most recently we saw a CI failure and data race (most likely) due to context cancellation: https://github.com/coder/coder/actions/runs/4174798570/jobs/7228842443

This issue has been open since Jan 2021: lib/pq#1021

We use a lot of contexts in our codebase and it seems dangerous for us to have potential data races happening in the database layer due to a timeout happening somewhere.

A more actively maintained library, with new features, is jackc/pgx.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiArea: HTTP APIs4Internal bugs (e.g. test flakes), extreme edge cases, and bug riskstinker-projectIdea for hackathon or between sprints. Only humans may set this.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions