-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pgp.pg.defaults are not respected for pooling #703
Comments
Seems like duplicate of #699 |
Ah, yeah, you're right. Sorry I missed that. There is still a reference to overriding pgp.pg.defaults in the README which caused some confusion. Maybe we should update that? "or override the default via pgp.pg.defaults.idleTimeoutMillis" |
This has been amended. Other than that, I'm not sure there is anything that can be done from this side, short of removing |
I think that's enough. Thanks! |
Cheers! |
I removed |
Expected behavior
pgp.pg.defaults.idleTimeoutMillis = 60000;
pgp.pg.defaults.max = 20;
dbInstance = pgp(CONFIG.dbConnectionString);
console.log(dbInstance.$pool.options.idleTimeoutMillis)
console.log(dbInstance.$pool.options.max)
// I expect it to print 60000 and 20
Actual behavior
pgp.pg.defaults.idleTimeoutMillis = 60000;
pgp.pg.defaults.max = 20;
dbInstance = pgp(CONFIG.dbConnectionString);
console.log(dbInstance.$pool.options.idleTimeoutMillis)
console.log(dbInstance.$pool.options.max)
// it actually prints 10000 and 10
Steps to reproduce
pgp.pg.defaults.idleTimeoutMillis = 60000;
pgp.pg.defaults.max = 20;
dbInstance = pgp(CONFIG.dbConnectionString);
console.log(dbInstance.$pool.options.idleTimeoutMillis)
console.log(dbInstance.$pool.options.max)
Environment
FWIW, I think this bug is a bug with pg-pool and I filed an issue there: brianc/node-postgres#2139
But I'm not sure if or when it will get fixed, so we might want to update the documentation to mention that these values can be overridden by this instead:
The text was updated successfully, but these errors were encountered: