Interesting. Well, I guess this hasn’t gotten a lot of traction in the last 2 years. However, it’s an interesting topic to me. In case your team or another team is pursuing this, here are some additional questions:
- Are there other infrastructure alternatives like haproxy, that have a native connection lifetime/max duration concept? The RFC may be strengthened by listing alternatives, and then comparing them to your proposed solution.
- Could this be implemented as an extension to active record, rather than in core active record, since it might not be useful generally? Most of the time I think the connections are either actively in use, or the active record connection pool client connections are open, but in an
idlestate, and theidle_timeoutshould reap them when that time is reached (300 seconds by default). - Is this unlikely to gain core acceptance, because it’s limited to PostgreSQL/pgbouncer only?
- Would the lifetime/duration work the same way when directly connected to the database, as opposed to when connected through pgbouncer?