Open
Description
If you will execute any read query, you can see in node inspector that GC ignores query result and doesn't cleanup it
const client = new PostgreSqlClient({...credentials, query_timeout: 15 * 60_000});
const cursor = client.query(
new Cursor(query),
unhandledErrorCallback,
);
await new Promise((resolve, reject) => {
cursor.read(100000, (error, _, result) => {
if (error) {
reject(error);
} else {
resolve(result);
}
})
})
This happens because of the callback with timeout cleanup:
https://github.com/brianc/node-postgres/blob/master/packages/pg/lib/client.js#L577
query.callback
will not be called even if you closed cursor and destroyed the client
Metadata
Metadata
Assignees
Labels
No labels