DEV Community

Discussion on: PostgreSQL For Those Who Can’t Even, Part 1

Collapse
 
pavanmehta profile image
Pavan Maheshwari

What's the best practice with using Connections and connections pools in RDBMS databases in nodejs? Do we release the connection after the use or do we keep it?
I've used Knex.js. Tried Objection.js ORM. I just want to know how ORMs internally manage the db connection objects.

Collapse
 
robconery profile image
Rob Conery

Going to tackle this in the next post - but usually it's pool management at the driver level, which is hard stuff to get right. PG-Promise does this for you and you can tweak the pool size as you need... but best practice is to let the driver do it :).