Summary: | ASTERISK-16143: [patch] pgsql realtime module not using local unix socket | ||
Reporter: | deepeshd (dps) | Labels: | |
Date Opened: | 2010-05-25 00:39:06 | Date Closed: | 2010-05-26 11:15:40 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Resources/res_config_pgsql |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 20100525__issue17392.diff.txt | |
Description: | Hello, I am using asterisk realtime with a postgresql database on same server. In res_pgsql.conf if I specify dbhost=localhost and dbport=5423 then a tcp connection is established with the pgsql db and everything works fine. However I would like to connect to db using local unix socket. When I remove the dbhost and dbport entries and instead specify dbsock=/tmp/.s.PGSQL.5432 then I get the following warnings on startup, but no connection with db is established. WARNING[1819]: res_config_pgsql.c:1367 parse_config: PostgreSQL RealTime: No database host found, using localhost via socket. WARNING[1819]: res_config_pgsql.c:1383 parse_config: PostgreSQL RealTime: No database port found, using 5432 as default. The asterisk version I am using is 1.6.2.7 | ||
Comments: | By: Paul Belanger (pabelanger) 2010-05-25 09:40:01 What are you setting in res_pgsql.conf.sample? Please post --- ; The value of dbhost may be either a hostname or an IP address. ; If dbhost is commented out or the string "localhost", a connection ; to the local host is assumed and dbsock is used instead of TCP/IP ; to connect to the server. By: deepeshd (dps) 2010-05-25 12:42:56 The following entries in res_pgsql.conf works [general] dbhost=localhost dbport=5432 dbname=asteriskdb dbuser=psql ;dbsock=/tmp/.s.PGSQL.5432 And if I change it to [general] ;dbhost=localhost ;dbport=5432 dbname=asteriskdb dbuser=psql dbsock=/tmp/.s.PGSQL.5432 then it does not work By: deepeshd (dps) 2010-05-26 03:51:58 After applying this patch it is working now. By: Digium Subversion (svnbot) 2010-05-26 11:14:48 Repository: asterisk Revision: 265894 U trunk/configs/res_pgsql.conf.sample U trunk/res/res_config_pgsql.c ------------------------------------------------------------------------ r265894 | tilghman | 2010-05-26 11:14:48 -0500 (Wed, 26 May 2010) | 8 lines Construct socket name, according to the Postgres docs, and document as such. (closes issue ASTERISK-16143) Reported by: dps Patches: 20100525__issue17392.diff.txt uploaded by tilghman (license 14) Tested by: dps ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=265894 By: Digium Subversion (svnbot) 2010-05-26 11:15:40 Repository: asterisk Revision: 265895 _U branches/1.6.2/ U branches/1.6.2/configs/res_pgsql.conf.sample U branches/1.6.2/res/res_config_pgsql.c ------------------------------------------------------------------------ r265895 | tilghman | 2010-05-26 11:15:40 -0500 (Wed, 26 May 2010) | 15 lines Merged revisions 265894 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r265894 | tilghman | 2010-05-26 11:14:48 -0500 (Wed, 26 May 2010) | 8 lines Construct socket name, according to the Postgres docs, and document as such. (closes issue ASTERISK-16143) Reported by: dps Patches: 20100525__issue17392.diff.txt uploaded by tilghman (license 14) Tested by: dps ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=265895 |