For me the issue was that i didn't put all string profile parameters value(like host, user, pass...) inside a quotation marks. While there is an example in documentation when they are also omitted. So it was something like this
jaffle_shop:
target: dev
outputs:
dev:
type: postgres
threads: 1
host: localhost
port: 5432
user: postgres
pass: example
dbname: postgres
schema: public
And it didn't work, but after i changed it to the following everything worked
jaffle_shop:
outputs:
dev:
type: postgres
threads: 1
host: "localhost"
port: 5432
user: "postgres"
pass: "example"
dbname: "postgres"
schema: "public"