diff --git a/packages/nodes-base/nodes/Postgres/Postgres.node.ts b/packages/nodes-base/nodes/Postgres/Postgres.node.ts index e4c5ca8252..eed3b50cf3 100644 --- a/packages/nodes-base/nodes/Postgres/Postgres.node.ts +++ b/packages/nodes-base/nodes/Postgres/Postgres.node.ts @@ -285,6 +285,9 @@ export class Postgres implements INodeType { throw new Error(`The operation "${operation}" is not supported!`); } + // Close the connection + await pgp.end(); + return this.prepareOutputData(returnItems); } }