Skip to content

Remove use of github.com/lib/pq as direct dependency#64584

Draft
adamkpickering wants to merge 1 commit intomasterfrom
adamkpickering/remove-lib-pq-dep
Draft

Remove use of github.com/lib/pq as direct dependency#64584
adamkpickering wants to merge 1 commit intomasterfrom
adamkpickering/remove-lib-pq-dep

Conversation

@adamkpickering
Copy link
Contributor

@adamkpickering adamkpickering commented Mar 12, 2026

As @rosstimothy noticed, we use github.com/lib/pq in only one place. This PR replaces that use with a type from github.com/jackc/pgconn.

Changelog: Remove direct dependency on github.com/lib/pq.

Manual Test Plan

Test Environment

Test Cases

  • Error is still printed by CLI OR reported in DB service logs when we:
    • Start a session as a user via a role with db_permissions set, and keep that session alive.
    • Modify db_permissions on the role so that the set of permissions granted to the user is different.
    • Attempt to start a second simultaneous session with the same user.
  • Repeat the above for redshift.
  • No error is printed when we:
    • Start a session as a user via a role with db_permissions set, and keep that session alive.
    • Without modifying that db_permissions, attempt to start a second simultaneous session with the same user.
  • Repeat the above for redshift.

go.mod Outdated
github.com/julienschmidt/httprouter v1.3.0 // replaced
github.com/keys-pub/go-libfido2 v1.5.3-0.20220306005615-8ab03fb1ec27 // replaced
github.com/lib/pq v1.10.9
github.com/lib/pq v1.10.9 // indirect
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please move this to the indirect dependencies block below?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's funny, I guess go mod tidy doesn't do that. Done.

@adamkpickering adamkpickering force-pushed the adamkpickering/remove-lib-pq-dep branch from 4b6fdfc to 8383a10 Compare March 12, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants