MagicStack / MagicStack/asyncpg
RDS Proxy Pinning
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.1k
- Forks
- 468
- PR merge metrics
- No merged PRs in 30d
Description
I am using asyncpg to query an postgres rds cluster. In my app I use asyncpg connection pools to aquire a connection and query the DB. I recently stood up an RDS Proxy in front of my RDS Cluster and I see almost 100% pinning because of the reset query used by asyncpg. I keep seeing the below message in my RDS Proxy logs for the pinned connections.
Consider moving session configuration to the proxy's initialization query. Digest: "select pg_advisory_unlock_all(); close all; unlisten *; reset all;".
Has anyone else run into connection pinning in RDS Proxy? I feel like the correct approach is not what is mentioned in the logs.
Thanks in advance :)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are mentioned. Start by reviewing asyncpg's connection-pool reset behavior alongside the RDS Proxy pinning log, then establish whether the reported reset query can be changed without breaking connection cleanup and verify the resulting pinning behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, postgresql, python
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100