Skip to content

chore(deps): bump github.com/jackc/pgx/v5 from 5.11.0 to 5.13.0 - #220

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/github.com/jackc/pgx/v5-5.13.0
Open

dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/github.com/jackc/pgx/v5-5.13.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Dec 1, 2026

Copy link
Copy Markdown
Contributor

Bumps github.com/jackc/pgx/v5 from 5.11.0 to 5.13.0.

Changelog

Sourced from github.com/jackc/pgx/v5's changelog.

5.13.0 (November 11, 2026)

This release adds automatic client certificate reloading and temporal precision metadata for database/sql. It also fixes a panic on malformed server responses, unsafe retries after connection failures, and range encoding. See Changes for client certificate configuration behavior that may affect existing applications.

Security Fixes

  • Panic in Rows.Values on malformed server responses (GHSA-w9rp-vfrh-q8vv). A server response containing fewer row values than declared fields could cause an index-out-of-range panic in Rows.Values. It now returns an error and closes the rows when the counts differ, including when there are extra values, matching Rows.Scan validation.

Features

  • pgconn: reload client certificates and keys configured through sslcert and sslkey for each TLS certificate request, allowing new connections to pick up rotated credentials without recreating the configuration or restarting the application. Files are still validated during configuration parsing. Relative paths retain their parse-time directory, and reloads follow symlinks (Erin Shepherd)
  • stdlib: expose fractional seconds precision for timestamp, timestamptz, time, timetz, and interval through ColumnTypePrecisionScale and database/sql.ColumnType.DecimalSize. These return precision 0, the fractional seconds precision as scale, and ok=true. The scale defaults to 6 when no fractional seconds precision is declared; precision 0 means numeric precision is not applicable (Danny Xu)

Changes

  • pgconn: file-backed client certificates are no longer stored in the parsed TLSConfig.Certificates slice. Setting TLSConfig.Certificates (including a non-nil empty slice) or TLSConfig.GetClientCertificate overrides automatic reloading. Replacing TLSConfig, including with a direct TLSConfig.Clone, discards the file-backed certificate settings; use pgconn.Config.Copy to preserve them when copying a configuration. Certificate and key files must remain readable for subsequent TLS certificate requests. Encrypted keys reuse the password resolved during configuration parsing; GetSSLPassword is not called again on reload.

Bug Fixes

  • pgconn: do not mark a connection-closed error encountered while receiving a response as safe to retry, since the request may already have reached the server. This prevents database/sql from automatically repeating a statement that may already have executed. The error still supports errors.Is(err, pgconn.ErrConnClosed) (Aayush Shah)
  • pgconn: skip sending a cancel request when a connection fails during startup, avoiding an unnecessary second connection attempt (felipe stival)
  • pgconn: accept unencrypted combined certificate/key PEM files with the certificate before the key, as well as key-first files (Erin Shepherd)
  • pgtype: encode Range[any] values returned by RangeCodec.DecodeValue and Rows.Values in both binary and text formats, allowing decoded ranges and multiranges to be reused as query arguments or in CopyFrom (waw666waw666)
  • stdlib: report ok=false for the precision and scale of unconstrained numeric columns instead of bogus values (Danny Xu)
  • stdlib: report math.MaxInt64 for the lengths of unconstrained varchar, bpchar, and varbit columns instead of negative lengths (PerryLink)

... (truncated)

Commits
  • 1e38d71 Update changelog for v5.13.0
  • e2bb010 Fix Rows.Values panic on mismatched field counts
  • 5b0fd94 Merge pull request #2709 from waw666waw666/fix-range-any-encode
  • 427f50d Merge pull request #2715 from v0idpwn/pgconn-no-cancel-on-failed-connect
  • 86b4411 Merge pull request #2713 from ksamirdev/fix-append-rows-by-name-bench
  • a3b88dc Merge pull request #2714 from PerryLink/stdlib-column-type-length-unbounded
  • 2f429e5 Merge pull request #2710 from dajiaohuang/codex/2705-pingtimeout-docs
  • 85c3e62 stdlib: close rows in precision and scale test
  • 4f41feb stdlib: clarify zero precision for temporal types
  • 22ccfd1 stdlib: document temporal precision and scale metadata
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.11.0 to 5.13.0.
- [Release notes](https://github.com/jackc/pgx/releases)
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md)
- [Commits](jackc/pgx@v5.11.0...v5.13.0)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v5
  dependency-version: 5.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot requested a review from harshsaver as a code owner December 1, 2026 19:30
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update go code labels Dec 1, 2026

@harshsaver harshsaver left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤖 Agentbox PR audit: changes requested

What needs to change

Please apply the fix plan above.
n/a

What this PR changes

  • What it does: Updates the library the hosted server uses to talk to PostgreSQL, from 5.11.0 to 5.13.0. One supporting library also receives a patch update.
  • What changes in the product: Nothing visible in normal use. A rare database failure now returns an error instead of automatically repeating a write that might already have succeeded. Operators using client certificate files must keep those files readable while the service runs.
  • Why it exists: The scheduled dependency update includes fixes for three published security advisories and several database reliability problems. Our checked-in usage avoids the specific vulnerable operations or enforces verified remote connections.
  • Why merge (or why not yet): The dependency record still names the old version. Repository policy requires updating it in this PR. The remaining fix is two lines.
  • What to expect after merging: Normal operation should stay the same. Check the deployed service’s real database connection and watch for newly surfaced connection errors. If client certificates are configured, confirm the service can continue reading their files. Required maintainer and code-owner review still applies.
Full audit (Claude (claude-opus-5-5, xhigh) × Codex (gpt-6.1-sol, xhigh), 2 turns, commit 7af2130)

PR audit: #220 — chore(deps): bump github.com/jackc/pgx/v5 from 5.11.0 to 5.13.0

Head: 7af2130

Sign-off

  • Claude (claude-opus-5-5, xhigh): ✅ satisfied — the bump is correct and checksum-verified; the only gap is the stale pgx version in docs/dependencies.md, a 2-line fix
  • Codex (gpt-6.1-sol, xhigh): ✅ satisfied — independently confirmed the documentation blocker and two-line fix; no additional blocking regression found

Decision

fix — the go.mod/go.sum bump is correct and CI is green, but docs/dependencies.md:16,20 still names pgx v5.11.0 and CONTRIBUTING.md:62 requires the pin record to change in the same PR

Should this exist?

  • Verdict: yes — this is the routine monthly Dependabot gomod update configured in .github/dependabot.yml:9-12. It updates an established PostgreSQL driver and includes security and correctness fixes.
  • Product-rule issues: None. The PR introduces no application limits, timers, thresholds or defaults. The retry correction is a bug fix. Certificate reloading is an upstream feature with an operational caveat described below; it is compatible with this repository’s configuration handling.
  • Simpler alternative: None. Updating the existing driver is the smallest change.
  • Real-launch evidence: not applicable — ordinary local CLI operation uses SQLite (bus/store.go:88). PostgreSQL is opened by hosted serving and database administration commands (cmd/agentintercom/hosted.go:62, cmd/agentintercom/database.go:30,36). CI exercises that backend against PostgreSQL 17.

What changes (plain language)

  • What it does: Updates the library the hosted server uses to talk to PostgreSQL, from 5.11.0 to 5.13.0. One supporting library also receives a patch update.
  • What changes in the product: Nothing visible in normal use. A rare database failure now returns an error instead of automatically repeating a write that might already have succeeded. Operators using client certificate files must keep those files readable while the service runs.
  • Why it exists: The scheduled dependency update includes fixes for three published security advisories and several database reliability problems. Our checked-in usage avoids the specific vulnerable operations or enforces verified remote connections.
  • Why merge (or why not yet): The dependency record still names the old version. Repository policy requires updating it in this PR. The remaining fix is two lines.
  • What to expect after merging: Normal operation should stay the same. Check the deployed service’s real database connection and watch for newly surfaced connection errors. If client certificates are configured, confirm the service can continue reading their files. Required maintainer and code-owner review still applies.

Findings

Blocking

  • docs/dependencies.md:16,20 — stale public dependency pin. The page names pgx **v5.11.0** and links its v5.11.0 release, while go.mod:11 now pins v5.13.0. CONTRIBUTING.md:62 explicitly requires pinned dependency changes to update the public pin record in the same PR. git log -S 'v5.11.0' -- docs/dependencies.md identifies the original pin documentation commit, 7575c4c; the current PR leaves that record unchanged. The correction is small and unambiguous, so the decision remains fix.

Non-blocking

  1. Retry correction verified against both versions. In v5.11.0, pgconn.receiveMessage returns a connLockError when the connection is already closed; that error reports itself safe to retry. V5.13.0 instead returns a pgconnError with safeToRetry: false from that branch. The stdlib adapter consequently stops translating this failure into driver.ErrBadConn, preventing an automatic repeat after the request might have reached PostgreSQL. This concerns that specific failure branch, rather than every dropped connection. Our database wrappers use database/sql (bus/sql_database.go:82), and repository searches found no dependency on these error types. Sources: old receive path, old retry classification, new receive path, stdlib error mapping.

  2. Certificate reloading survives our configuration copies. bus/postgres.go:58,63 validates TLS settings without inspecting or replacing the certificate slice. Its stdlib.OpenDB(*config) call at :75 preserves the TLS pointers and loader map through the shallow copies. Upstream pgx.ConnectConfig then calls ConnConfig.Copy; pgconn.Config.Copy clones primary and fallback TLS configurations and re-keys their certificate loaders. No copy-related regression was found. Reloading happens when TLS requests a client certificate, so configured files must remain readable. Repository searches found no checked-in client-certificate configuration; this does not establish what an operator supplies privately. Sources: stdlib connector, connection configuration copy, loader preservation and TLS preparation.

  3. The three advisory fixes are useful, but applicability needs precise wording.

    • GHSA-j38q-h3ph-jjpq, High, affects pgx v5 >= 5.0.0, < 5.12.0: injection through simple-protocol SendBatch. We never call SendBatch. bus/postgres.go:74 selects QueryExecModeExec for parameterized operations. That setting does not eliminate all simple-protocol execution: upstream still uses simple protocol for argument-free Exec, including our migration statements. Those calls do not use the vulnerable batch assembly.
    • GHSA-95fj-3fxw-g62g, High, affects >= 5.9.0, < 5.12.0: bypassed authentication-policy enforcement. The repository sets neither policy, although operators can supply connection parameters or environment settings. Our remote-host TLS validation (bus/postgres.go:86-97) independently requires certificate verification; the advisory does not bypass that verification.
    • GHSA-w9rp-vfrh-q8vv, Low, lists affected versions <= 5.12.0: malformed-row panic in Rows.Values. We do not call Values. With our Go 1.27 toolchain, stdlib uses NextRow/ScanColumn, which access RawValues. This supports excluding the advisory’s named entry point, not claiming immunity to every malformed server response. The raw indexing in that scanner already exists in both versions. Sources: argument-free execution, old Go 1.27 scanner, new scanner.

    The green govulncheck job is additional evidence, not proof that these particular advisories are registered in its database or that every hostile-server path is safe. Turn 2 could not independently repeat the earlier OSV listing check.

  4. The skipped 5.12.0 release was reviewed. The PR body includes only the 5.13.0 changelog. Relevant additional changes are:

    • sslcertmode defaults to allow, preserving normal certificate behavior.
    • Windows service-file lookup prefers %APPDATA%\postgresql\.pg_service.conf, with fallback to the previous home-directory location when appropriate. This matters when service configuration is selected, including through PGSERVICE; the repository supplies none.
    • New pgxpool connection deadlines do not apply because this repository creates no pgxpool pool.
    • The new BatchResults.Tx method affects custom interface implementations; we implement none.
    • Go 1.27 scan-destination classification now caches its result. Comparison of both implementations found the classification logic unchanged. Column-metadata additions have no repository call sites.

    Sources: release notes, Windows defaults, new scanner, old scanner.

  5. No additional puddle update is needed here. Pgx v5.13.0 requires puddle v2.2.3. A v2.2.4 release also exists, but the pool operations it fixes are outside our stdlib.OpenDB configuration. The v2.2.2 and v2.2.3 module files are identical, explaining their unchanged /go.mod checksum. Sources: pgx requirements, puddle v2.2.2 module, v2.2.3 module.

  6. Dependabot branch maintenance and sibling updates. The PR body warns that editing its branch affects Dependabot conflict handling and that recreation overwrites edits. Preserve the documentation fix during subsequent branch maintenance. Local comparison of sibling heads 3fb847c (#217), 78f1b41 (#218) and 102aec4 (#219) confirms they change different dependency entries. Their current diffs contain no documentation changes; the anticipated Stripe documentation correction concerns a separate paragraph. No overlapping changed lines were found, but combined dependency resolution and required checks should still be verified after integration.

Fix plan

Edit one file, docs/dependencies.md, on the PR branch. No other file changes.

  1. docs/dependencies.md:16: change The PostgreSQL backend uses `github.com/jackc/pgx/v5` **v5.11.0** through its to The PostgreSQL backend uses `github.com/jackc/pgx/v5` **v5.13.0** through its.
  2. docs/dependencies.md:20: change same Go lock files. Source and release: [pgx](https://github.com/jackc/pgx/releases/tag/v5.11.0). to same Go lock files. Source and release: [pgx](https://github.com/jackc/pgx/releases/tag/v5.13.0). The v5.13.0 release page exists: HTTP 200, a GitHub Release object for commit 1e38d71.
  3. Check: git grep -n '5\.11\.0' should return no pgx hits, and git diff --stat should show only docs/dependencies.md (2 lines). Then re-run CI. It's a docs-only change, so all 11 checks should stay green.

Message to the developer

Please apply the fix plan above.
n/a

Questions for Harsh

n/a

Verification

  • PR and discussion: the requested default gh pr view ... --comments failed because this installed CLI requests deprecated Projects fields. Retried successfully with explicit JSON fields for the body, comments, reviews, commits and checks. There are no comments or reviews. The body links upstream releases, advisories and commits.

  • Full diff: independently read git diff 4efe404f5aaaee841e327ed08b87bb8020f4bffe...HEAD. Only go.mod and go.sum change: pgx v5.11.0→v5.13.0 and puddle v2.2.2→v2.2.3. Confirmed the single commit, expected head and parent. git diff --check passes.

  • Documentation: independently read CONTRIBUTING.md and docs/dependencies.md. git grep -n '5\.11\.0' returns exactly the two stale documentation lines. Historical search confirms the original pin record.

  • Checksums: Claude’s Turn 1 verification against sum.golang.org recorded:

    • pgx h1:Hl08k64maU0nrRyVUEbwCnK6/gT0EhMrtAqBHz9/gA4=; /go.mod h1:u2Fi6no03HCSBYE+ZVdLxbwdu3xyi2vU+K/YNJioSds=
    • puddle h1:f8HoREISb3l5eO9coPgK7U3hKLhWGokOFVcThl5jrao=; /go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=

    Turn 2 confirmed those strings match go.sum:42-45. Independent checksum-service requests were unavailable through the web tools, and shell network access failed; the external checksum verification remains attributed to Turn 1.

  • Compatibility and release: independently read upstream v5.13.0 go.mod. Its Go 1.25 requirement is below our Go 1.26 floor and selected Go 1.27 toolchain. Its x/sync v0.22.0 and x/text v0.41.0 requirements are satisfied by our existing pins. Independently opened the v5.13.0 release, which identifies commit 1e38d71. Turn 1 additionally checked the proxy’s full origin hash and version metadata; those proxy requests could not be repeated this turn.

  • Code paths: read bus/postgres.go, bus/sql_database.go, bus/store.go, bus/errors.go, database error tests, PostgreSQL runtime/conformance tests, command entry points and deployment documentation. Independently checked upstream retry handling, certificate loading/copying, verified TLS, Go 1.27 scanning and the three advisories.

  • CI: independently confirmed 11/11 checks SUCCESS in run 46727031410. The hosted job runs PostgreSQL and hosted tests with the race detector against PostgreSQL 17. Its URL explicitly disables TLS over loopback (.github/workflows/ci.yml:144), so it does not establish deployed TLS, certificate rotation or transaction-pooler behavior.

  • Merge requirements: CONTRIBUTING.md:58-59 requires approving maintainer and code-owner review. No reviews are currently recorded; green checks do not remove that requirement.

  • Not run: no installs, builds, tests, repository scripts, go mod verify or go mod tidy, following the outside-contributor restriction. No tracked files or GitHub state were modified; the checkout remains clean. Harsh can optionally verify module integrity and tidiness locally. Deployment verification should include agentintercom database check against the real verified-TLS connection.

Audit log

  • Turn 1 (Claude (claude-opus-5-5, xhigh)):
    • Read the PR body, the diff, and all pgx call sites and docs.
    • Verified the go.sum lines against sum.golang.org, the proxy .mod/.info/@latest, and the go-directive and requirement compatibility.
    • Reviewed the upstream 5.12.0 and 5.13.0 changelog, the three advisories, and the v5.13.0 TLS, retry and stdlib source against our usage.
    • Checked sibling Dependabot PRs for overlapping hunks.
    • Found the stale pin record in docs/dependencies.md:16,20 against CONTRIBUTING.md:62. Decision: fix (2-line doc edit).
  • Turn 2 (Codex (gpt-6.1-sol, xhigh)): Independently confirmed the blocker, unchanged fix plan, full diff, CI, repository usage and upstream compatibility; narrowed retry/security claims, checked Go 1.27 scanning and argument-free simple-protocol execution, distinguished checked-in configuration from private deployment settings, and recorded verification limitations. No additional blocking finding; decision remains fix.

Automated review by Harsh's agentbox: two AI reviewers audited this PR against the project ruleset and agreed on it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant