c/driver/postgresql: make connection init/release thread safe
- Dominant language
- C#
- Stars
- 627
- Forks
- 217
- Avg merge
- 17h
- Merged PRs (30d)
- 57
Description
### What feature or improvement would you like to see?
I know that the docs mention that in general concurrent access should be serialised but it also mentions that specific implementations may permit multiple threads.
It would be nice if this supported concurrent connection creation/release as otherwise maintaining a pool of connections requires creating/releasing to hold a mutex.
I think it should be trivial to do in this case, it just requires changing open_connections_ to be atomic
Contributor guide
Research direction
Start in the c/driver/postgresql implementation by locating open_connections_ and tracing connection creation and release. Confirm that concurrent connection creation and release can proceed safely without callers holding a mutex, then verify the behavior with the project's relevant checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, postgresql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100