I encounter this issue as well. I think that it started to appear when I changed execution mode from “own” to “main” as suggested by documentation. I’m using latest n8n version and I tried to recreate node to use latest postgres node version.
Here’s relevant JSON snippet:
{
"parameters": {
"operation": "update",
"schema": {
"__rl": true,
"mode": "list",
"value": "public"
},
"table": {
"__rl": true,
"value": "patients",
"mode": "list",
"cachedResultName": "patients"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"id": "={{ $node[\"GetPatient\"].json[\"id\"] }}",
"firstname": "={{$node[\"XML1\"].json[\"data\"][\"GetPersonByFIOIINResponse\"][\"array\"][\"firstName\"]}}",
"lastname": "={{$node[\"XML1\"].json[\"data\"][\"GetPersonByFIOIINResponse\"][\"array\"][\"lastName\"]}}",
"bdate": "={{$node[\"XML1\"].json[\"data\"][\"GetPersonByFIOIINResponse\"][\"array\"][\"birthDate\"]}}",
"region": "Astana",
"gender": "={{$node[\"XML1\"].json[\"data\"][\"GetPersonByFIOIINResponse\"][\"array\"][\"sex\"]}}",
"fullname": "={{$node[\"XML1\"].json[\"data\"][\"GetPersonByFIOIINResponse\"][\"array\"][\"lastName\"]}} {{$node[\"XML1\"].json[\"data\"][\"GetPersonByFIOIINResponse\"][\"array\"][\"firstName\"]}} {{$node[\"XML1\"].json[\"data\"][\"GetPersonByFIOIINResponse\"][\"array\"][\"secondName\"]}}",
"surname": "={{$node[\"XML1\"].json[\"data\"][\"GetPersonByFIOIINResponse\"][\"array\"][\"secondName\"]}}",
"document_type": "IIN"
},
"matchingColumns": [
"id"
],
"schema": [
{
"id": "id",
"displayName": "id",
"required": true,
"defaultMatch": true,
"display": true,
"type": "number",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "created_at",
"displayName": "created_at",
"required": false,
"defaultMatch": false,
"display": true,
"type": "dateTime",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "iin",
"displayName": "iin",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "firstname",
"displayName": "firstname",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "lastname",
"displayName": "lastname",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "surname",
"displayName": "surname",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "bdate",
"displayName": "bdate",
"required": false,
"defaultMatch": false,
"display": true,
"type": "dateTime",
"canBeUsedToMatch": true
},
{
"id": "region",
"displayName": "region",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "gender",
"displayName": "gender",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "phone",
"displayName": "phone",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "fullname",
"displayName": "fullname",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "email",
"displayName": "email",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "passport_id",
"displayName": "passport_id",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
},
{
"id": "document_type",
"displayName": "document_type",
"required": true,
"defaultMatch": false,
"display": true,
"type": "options",
"canBeUsedToMatch": true,
"options": [
{
"name": "PASSPORT",
"value": "PASSPORT"
},
{
"name": "IIN",
"value": "IIN"
}
]
},
{
"id": "lang",
"displayName": "lang",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": true
}
]
},
"options": {}
},
"id": "c2c1dc10-256b-4206-8c23-48496686d7b3",
"name": "UpdatePatientRPNandPhone1N",
"type": "n8n-nodes-base.postgres",
"typeVersion": 2.2,
"position": [
3060,
440
],
"credentials": {
"postgres": {
"id": "25",
"name": "MedreviewDB_157"
}
}
}
],
and here’s stacktrace:
Workflow: JOB_CheckIIN_V2
URL: https://n8n-test.cmctech.pro/workflow/157/executions/1835055
Node: UpdatePatientRPNandPhone1N
Message: Connection pool of the database object has been destroyed.
Stack: Error: Connection pool of the database object has been destroyed.
at /usr/local/lib/node_modules/n8n/node_modules/pg-promise/lib/connect.js:24:25
at new Promise (<anonymous>)
at Object.promise (/usr/local/lib/node_modules/n8n/node_modules/pg-promise/lib/promise-parser.js:30:20)
at poolConnect (/usr/local/lib/node_modules/n8n/node_modules/pg-promise/lib/connect.js:20:19)
at Object.pool (/usr/local/lib/node_modules/n8n/node_modules/pg-promise/lib/connect.js:176:24)
at Database.query (/usr/local/lib/node_modules/n8n/node_modules/pg-promise/lib/database.js:330:36)
at Database.obj.any (/usr/local/lib/node_modules/n8n/node_modules/pg-promise/lib/database.js:772:30)
at getTableSchema (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Postgres/v2/helpers/utils.js:234:30)
at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Postgres/v2/actions/database/update.operation.js:229:62)
at processTicksAndRejections (node:internal/process/task_queues:95:5)