In a non-asynchronous database connection, I can create several threads, each has their own database client, i.e pooling.
However, in an asynchronous context, should I use the same approach as above (pooling)?
I believe the answer is, yes. Because I've seen database client pooling in Node.js (node-postgres, etc), and it is asyncronous...
Yes - your IO implementation doesn't affect the need to have separate connections to service concurrent requests.
Thank you for the response. But, is there any existing example for tokio-postgres pooling? If there isn't any, would you at least give a clue of how to build one?
I haven't used it (I don't use async) but the deadpool-postgres crate has examples using tokio-postgress, in the crate's readme.