Skip to content

Comments

Switch from lib/pq to jackc/pgx/stdlib#124

Closed
rowanseymour wants to merge 1 commit intomainfrom
pgx
Closed

Switch from lib/pq to jackc/pgx/stdlib#124
rowanseymour wants to merge 1 commit intomainfrom
pgx

Conversation

@rowanseymour
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings October 13, 2025 21:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR switches the PostgreSQL driver from lib/pq to jackc/pgx/stdlib for improved performance and features. The change involves updating imports, dependency declarations, and database connection strings.

  • Replace lib/pq driver with jackc/pgx/v5/stdlib
  • Update database connection driver name from "postgres" to "pgx"
  • Add new pgx dependencies and remove old pq imports

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

File Description
runtime/runtime.go Adds pgx driver import
go.mod Updates dependencies to include pgx and related packages
cmd/rp-archiver/main.go Removes pq import and changes driver name to "pgx"
archives/archives_test.go Removes pq import and changes driver name to "pgx" in tests

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

github.com/aws/smithy-go v1.23.0
github.com/getsentry/sentry-go v0.35.3
github.com/jackc/pgx/v5 v5.7.6
github.com/lib/pq v1.10.9
Copy link

Copilot AI Oct 13, 2025

Choose a reason for hiding this comment

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

The lib/pq dependency should be removed since the code is switching to pgx. Keeping the old dependency may cause confusion and increases the binary size unnecessarily.

Suggested change
github.com/lib/pq v1.10.9

Copilot uses AI. Check for mistakes.
@rowanseymour rowanseymour deleted the pgx branch October 13, 2025 22:10
@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant