Skip to content

c/driver/postgresql: make connection init/release thread safe #4753

Description

@jtanx

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions