You can find the port number of the correct postgresql by right clicking the correct postgresql in the pgadmin, then navigate to properties → under connection as shown in the below image
Then, inside your modeler→ project settings → Change the port number as configured in the below image
Hope this will solve your issue, Thanks
You need to add the Postgres portnumber like localhost:5434. In our office we use the rule that the last number is always the same number as the postgres version. SO Postgres 9.4 runs on port 5434 and 9.5 runs on port 5435 etc.