Skip to content

Add support for rotating connection details #291

Closed
@tomalexander

Description

@tomalexander

It would be nice if the Pool supported rotating connection details. Our use-case would be using the hashicorp vault database secrets engine to generate postgres credentials on-the-fly. These credentials inherently have a limited life-span so when they expire we'd need to rotate them. As a work-around we were going to swap out the pool with a new pool but #290 prevents that.

One possible way to implement it, would be:

  1. expose a function to set the connection details
  2. when that function is called, all new calls to acquire() would return connections with the new connection details set
  3. as connections with the old details are returned to the pool they get discarded

I could see this also being useful for fail-overs but thats not our use-case so idk

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions