postgres icon indicating copy to clipboard operation
postgres copied to clipboard

Observing pool clients going into idle state

Open cramforce opened this issue 5 months ago • 0 comments

Hey,

For Vercel's Fluid Compute platform it is important to be able to observe when pool clients either become idle, so that the platform can ensure that VMs do not suspend while the idle timer is going (since that may "leak" connections). Details in this blog post https://vercel.com/blog/the-real-serverless-compute-to-database-connection-problem-solved and the implementation is in this file https://github.com/vercel/vercel/blob/94b9a307bef41ae96126b1376a621c650f0bcacd/packages/functions/src/db-connections/index.ts#L221

We support most popular DB pools, but it doesn't currently seem possible to support postgres.js

Advice on whether it is possible to do this would be greatly appreciated!

Thanks!

cramforce avatar Aug 14 '25 14:08 cramforce