Skip to content

Always use client cursor when connecting to pgbouncer - #21649

Merged
sarah-witt merged 2 commits into
masterfrom
sarah/pgbouncer-always-use-client-cursor
Oct 14, 2025
Merged

Always use client cursor when connecting to pgbouncer#21649
sarah-witt merged 2 commits into
masterfrom
sarah/pgbouncer-always-use-client-cursor

Conversation

@sarah-witt

@sarah-witt sarah-witt commented Oct 14, 2025

Copy link
Copy Markdown
Collaborator

What does this PR do?

This PR ensures we always use ClientCursor (and simple query protocol) when connecting to pgbouncer.

Motivation

Customers connecting via the admin console could see an error reported here: DataDog/datadog-agent#41463
psycopg3 docs: https://www.psycopg.org/psycopg3/docs/advanced/cursors.html#simple-query-protocol

thanks @eric-weaver!

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

@codecov

codecov Bot commented Oct 14, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.00%. Comparing base (68e5f75) to head (76f7aa1).
⚠️ Report is 28 commits behind head on master.

Additional details and impacted files
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sarah-witt
sarah-witt marked this pull request as ready for review October 14, 2025 14:58
@sarah-witt
sarah-witt requested a review from a team as a code owner October 14, 2025 14:58

@eric-weaver eric-weaver left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fix looks good to me. The previous connection arg combinations that would skip setting ClientCursor factory now look always covered 👍

@sarah-witt
sarah-witt added this pull request to the merge queue Oct 14, 2025
Merged via the queue into master with commit c1555a7 Oct 14, 2025
47 checks passed
@sarah-witt
sarah-witt deleted the sarah/pgbouncer-always-use-client-cursor branch October 14, 2025 18:41
datadog-agent-integrations-bot Bot pushed a commit that referenced this pull request Oct 14, 2025
* Always use client cursor

* Add changelog

(cherry picked from commit c1555a7)
github-actions Bot pushed a commit to bskinny/integrations-core that referenced this pull request Oct 14, 2025
Kyle-Neale pushed a commit that referenced this pull request Oct 14, 2025
* Always use client cursor

* Add changelog

(cherry picked from commit c1555a7)

Co-authored-by: Sarah Witt <sarah.witt@datadoghq.com>
@dkirov-dd dkirov-dd mentioned this pull request Oct 17, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants