Or if you have docker running then you can look at this docker-compose which simply spins up Postgres with PGVector extension without the need to setup anything:
https://github.com/n8n-io/n8n-hosting/pull/33/files#diff-bec75208f73ea7b1a7c6b5fe158407c6401bef063c4e47e886b2a45bc5b4840a