I start an app which use a libpq function to read connection params in a
URI. Until now, the app was using a tcp connection to connect to postgresql
with this URI:

postgres://
mmuser:mmuser_password@10.10.10.1:5432/mattermost?sslmode=disable&connect_timeout=10

I want to switch and make the app connect to the unix socket instead. I am
trying to figure out what would then be the correct URI, with no luck until
now.

----------------------------
1- I modified the pg_hba.conf this way:

local   mattermost          mmuser                      peer
map=mattermap
-----------------
2- I modified pg_ident.conf this way:

   mattermap      mattermost              mmuser
----------------------------------

3- I changed the URI this way:

postgres:/mmuser:PrOOt34/mattermost?connect_timeout=10

(NB: do I have to write in the URI the mmuser postgresql password, or Unix
user password?)

 I recieve an error:
Failed to ping db err:pq: SSL is not enabled on the server

sslmode is ignored for Unix domain socket communication, so why this error?
I suspect my URI is not writen properly, but after many tries, I can't find
a working one.
Thank you for help.

Reply via email to