You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, pgwire.pool() method doesn't require awaiting (i.e. it returns a non-Promise), and this is great, because I can call it in e.g. objects' constructors.
Also, there is Pool.logicalReplication() method which is also very convenient: it always creates a new connection for streaming the changes.
But Pool can't create connections for another type of usecases: when I run a huge SELECT * FROM tbl query and want to stream the rows from it for minutes (the table is big). This also requires a new connection creation, and Pool can't do this.
I propose to close the gap and add newConnection() to Pool class. Otherwise, there is no other way to create a connection without awaiting on it (pgwire.connect() returns a Promise), and non-async connecting is a good thing to have.
Below is a code example, what I have to do - use Connection class directly (although it's not default-exported by the library). I could've used pgwire.pool() for this (with poolMaxConnections=1), but it doesn't have newConnection().
The text was updated successfully, but these errors were encountered:
Currently, pgwire.pool() method doesn't require awaiting (i.e. it returns a non-Promise), and this is great, because I can call it in e.g. objects' constructors.
Also, there is Pool.logicalReplication() method which is also very convenient: it always creates a new connection for streaming the changes.
But Pool can't create connections for another type of usecases: when I run a huge
SELECT * FROM tbl
query and want to stream the rows from it for minutes (the table is big). This also requires a new connection creation, and Pool can't do this.I propose to close the gap and add newConnection() to Pool class. Otherwise, there is no other way to create a connection without awaiting on it (pgwire.connect() returns a Promise), and non-async connecting is a good thing to have.
Below is a code example, what I have to do - use Connection class directly (although it's not default-exported by the library). I could've used pgwire.pool() for this (with poolMaxConnections=1), but it doesn't have newConnection().
The text was updated successfully, but these errors were encountered: