Libpq functions & string to obtain connection parameters

Поиск
Список
Период
Сортировка
От arnaud gaboury
Тема Libpq functions & string to obtain connection parameters
Дата
Msg-id CAK1hC9srF0boV90sXCJK1Gu2+jKCrvnGRrMRMQYDrCV3CGbtkA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Libpq functions & string to obtain connection parameters  (Andreas Kretschmer <akretschmer@spamfence.net>)
Список pgsql-general
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.



В списке pgsql-general по дате отправления:

Предыдущее
От: Rakesh Kumar
Дата:
Сообщение: pgpool question
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: Libpq functions & string to obtain connection parameters