Describe the problem/error/question
hi, i made a workflow that will select n rows from a table with LIMIT keyword, process them and update these records. when select statement returns 0 records it wil finish. inserted 3 records manually to the table. when the workflow runs, on the 2. run it shows duplicate record, and on the last run it returns success true. Is there a bug in the postgresql node ?
here are the screenshots:
What is the error message (if any)?
Please share your workflow
Share the output returned by the last node
Information on your n8n setup
**n8n version:1.8.2
**Database (default: SQLite):postgres
**n8n EXECUTIONS_PROCESS setting (default: own, main):default
**Running n8n via (Docker, npm, n8n cloud, desktop app):npm
**Operating system:mac os ventura 13.5.2
cant post the ddl and dml statements, is there a trick to it ?
barn4k
June 10, 2024, 7:30am
3
hello @slenderwrist
I would try to update the n8n to the latest version, your is quite old (~6 month old)
dont know if i should create a new question but, tried with 1.44.1 on a different machine
linux opensuse leap 15.5
:~> node --version
v18.20.3
~> npm --version
10.7.0
npm install -g [email protected]
i have both postgresql and n8n running on the host machine.
i can connect to postgresql from dbeaver heres the screenshot:
i cant connect from n8n to postgresql
heres the screenshot:
barn4k
June 11, 2024, 7:38am
5
It says that the ident auth failed. Check the auth settings of your Postgres
I suppose ident auth won’t work within n8n, you’ll need a user/password
for the reference: postgresql - psql: FATAL: Ident authentication failed for user "postgres" - Stack Overflow
sorry about ident stuff, i must have misconfigured it, fixed it.
i think the problem still exists.
OS: linux opensuse leap 15.5
n8n version: 1.44.1
running via npm
db default sqlite
executions mode: default
here are the screenshots:
created a new workflow from scratch no copy paste.
barn4k
June 12, 2024, 10:12am
7
Ah, I see. It’s not an issue with postgres. That’s where the issue comes from:
The Done branch of the Loop Node returns two items, so your Postgres node will be executed twice (once per each item).
Set the node to execute only once in the Node settings
1 Like
thnx for the help, didnt notice the done branch returned 2 items
system
Closed
June 19, 2024, 12:39pm
9
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.