mcp icon indicating copy to clipboard operation
mcp copied to clipboard

fix(postgres-mcp-server): Initialize psycopg connection in DBConnectionSingleton #1150

Open mniec opened this issue 3 months ago • 9 comments

Summary

Add full support for psycopg Postgres direct connection. Fixes #1150

Changes

  • Add conditional init in DBConnectionSingleton for RDS Data API or psycopg
  • Update server to initialize singleton for both connection modes and remove direct pool instantiation

User experience

No changes

Checklist

If your change doesn't seem to apply, please leave them unchecked.

  • [x] I have reviewed the contributing guidelines
  • [x] I have performed a self-review of this change
  • [x] Changes have been tested
  • [x] Changes are documented

Is this a breaking change? (Y/N) N

RFC issue number:

Checklist:

  • [ ] Migration process documented
  • [ ] Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

mniec avatar Aug 21 '25 13:08 mniec

Dealing with the same problem. Hopefully this PR can be merged soon 🙏

MathiasHaudgaard avatar Aug 25 '25 08:08 MathiasHaudgaard

Same here. Waiting for the PR to be merged

rohanmg avatar Aug 26 '25 00:08 rohanmg

Any updates?

MathiasHaudgaard avatar Sep 02 '25 07:09 MathiasHaudgaard

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 90.25%. Comparing base (db24045) to head (73c58ba). :warning: Report is 196 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1151      +/-   ##
==========================================
+ Coverage   89.48%   90.25%   +0.76%     
==========================================
  Files         711      740      +29     
  Lines       49519    54560    +5041     
  Branches     7767     8900    +1133     
==========================================
+ Hits        44314    49244    +4930     
+ Misses       3371     3348      -23     
- Partials     1834     1968     +134     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Sep 08 '25 15:09 codecov[bot]

This pull request is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon. If you wish to exclude this issue from being marked as stale, add the "backlog" label.

github-actions[bot] avatar Oct 12 '25 01:10 github-actions[bot]

Closing this pull request as it hasn't seen activity for a while. Please add a comment @mentioning a maintainer to reopen. If you wish to exclude this issue from being marked as stale, add the "backlog" label.

github-actions[bot] avatar Oct 14 '25 01:10 github-actions[bot]

@kennthhz this seems like a highly requested fix, but the PR has some issues with tests and the precommits. Can you help get it across?

theagenticguy avatar Oct 14 '25 12:10 theagenticguy

This pull request is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon. If you wish to exclude this issue from being marked as stale, add the "backlog" label.

github-actions[bot] avatar Oct 29 '25 01:10 github-actions[bot]

Closing this pull request as it hasn't seen activity for a while. Please add a comment @mentioning a maintainer to reopen. If you wish to exclude this issue from being marked as stale, add the "backlog" label.

github-actions[bot] avatar Nov 04 '25 01:11 github-actions[bot]