Questions tagged [node-pg-pool]

A connection pool for node-postgres node.js

https://github.com/brianc/node-pg-pool A connection pool for node-postgres node.js

48 questions
0
votes
0 answers

NodeJS pg module doesn't rollback inside a transaction

When I try to rollback inside a transaction: const client = await pool.connect() try { await client.query('BEGIN') const result = await client.query('SELECT...') if (result) { await client.query('ROLLBACK') } //DOESN'T WORK if…
0
votes
1 answer

node-pg-pool: How can specify the max size in Pool

I am using node-pg-pool to query my Postgres db (host in AWS, db.t2.micro) in my REST API. I have a concern how to specify a optimal number for max size of Pool. I got some useful formulas to get pool size from…
Phong Vu
  • 2,726
  • 6
  • 24
  • 52
0
votes
1 answer

Node.js pg Pool slow on second execute

I've run into a strange issue that I can't seem to get right. I'm using pg pooling in a Node.js app and it runs really quickly on the first execute and then on the second one it is dramatically slower (30/50secs). I've read through the documentation…
1 2 3
4