We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af8bc38 commit e69c1f8Copy full SHA for e69c1f8
postgresql.js
@@ -220,8 +220,13 @@ module.exports = function (RED) {
220
downstreamReady = true;
221
222
try {
223
- if (msg.pgConfig) {
224
- client = new Client(msg.pgConfig);
+ if (msg.pgConfig || node.listen) {
+ // Do not use pool for clients with custom config nor for listeners
225
+ const pgConfig = Object.assign({},
226
+ node.config.pgPool.options, {
227
+ password: node.config.password,
228
+ }, msg.pgConfig);
229
+ client = new Client(pgConfig);
230
await client.connect();
231
} else {
232
client = await node.config.pgPool.connect();
0 commit comments