-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add PG.prototype.disconnect method? #1193
Comments
It would be better to create your own
|
|
Could you give an example of this, please? Sounds like a potential bug report. |
|
@charmander That is bad advice. If someone is using an external pooler (e.g. pgbouncer) or none at all, there is no reason to use the built-in pooling. |
@rpedela You’re confusing |
Ah, you are right. Sorry. |
|
Hi,
It seems that connection pool objects have an independent
end
function (Pool.prototype.end).Currently the
PG.prototype.end
function does not call each pool'send
function and instead manually closes the connection pool by calling the lower leveldrain
anddestroyAllNow
functions.My requests:
Can we change
PG.prototype.end
to usePool.prototype.end
? This would by more DRY.Can we add a
PG.prototype.disconnect
function? It would have the same signature asPG.prototype.connect
.Essentially, there is a public API to add a connection pool to
_pools
and I was looking for a public api to remove a particular connection pool.The disconnect function would similarly
JSON.stringify
the config object to find the key and then remove it fromthis._pools
.Thanks,
Al
The text was updated successfully, but these errors were encountered: