Postgres Unit Socket Support #6272
98h398hrpohpoai
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
Open to a PR to add this functionality |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to add support for postgres unix sockets?
They generally tend to provide better security and performance.
It appears it was previously possible with #1557, however, this workaround no longer works as sequelize produces errors without a DATABASE_URL variable, and does not pass the socket through properly with it.
Passing through a socket via something like postgres://outline:password@/outline?host=/run/postgresql treats it as a tcp connection with the following error despite being supported syntax:
ERROR: connect ECONNREFUSED 127.0.0.1:5432
Edit: This is addressed more thoroughly below, but the error with my attempt above is not specifying the host and port despite providing the socket config.
Specifying these variables alters how the postgres connector searches for the socket in the case of non-standard configuration i.e. anything other than localhost:5432, which would be the container itself.
Beta Was this translation helpful? Give feedback.
All reactions