I’ve come across this thread because I’m encountering the exact same issue with duplicate insertions in the “workflow_statistics” table. Here’s an excerpt from my error log:
2023-10-21 08:20:46.201 UTC [XXXXX] ERROR: duplicate key value violates unique constraint "pk_workflow_statistics"
2023-10-21 08:20:46.201 UTC [XXXXX] DETAIL: Key ("workflowId", name)=(XXXXXXXXXXXX, data_loaded) already exists.
2023-10-21 08:20:46.201 UTC [XXXXX] STATEMENT: INSERT INTO "public"."workflow_statistics"("count", "latestEvent", "name", "workflowId") VALUES ($1, $2, $3, $4)
... [similar lines continue]
It appears the same key is being attempted for insertion multiple times. Has anyone found a solution or received feedback from the n8n team regarding this? Any insights or workarounds would be greatly appreciated!
We are aware of this and have a dev ticket opened to fix it but at the moment as it doesn’t break anything the priority is fairly low. This will be fixed and hopefully before the end of the year.
Our of interest other than the extra log lines is this breaking anything for you?