Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > PostgreSQL > No UNIX domain socket

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-26-07, 10:12
joebert joebert is offline
Registered User
 
Join Date: Dec 2007
Location: Clearwater, FL USA
Posts: 2
No UNIX domain socket

I installed pgSQL on my test server (Ubuntu 7.10), to uh, test it. I've got a problem with how I'm able to connect to it though.

I left everything I could at default settings.
I tried uncommenting & altering the unix_socket_* settings in postgresql.conf with no change, though the server did refuse to start when I used the group Apache uses.
Code:
unix_socket_directory = '/var/run/postgresql' # (change requires restart) unix_socket_group = 'postgres' # (change requires restart) unix_socket_permissions = 0777 # octal

When I look at "netstat -l" I see an entry for postgresql in the TCP listeners, but there's no UNIX domain socket entry listed.

This leads to a problem where PHP can connect through TCP using pg_connect, but "localhost" must be explicitly implied to force PHP to use TCP mode or else it will fail to connect with no error message.
From what I understand TCP is slower than a UNIX socket so I anticipate having that socket listening can only be good. I've been forced to alter DBAL code on one OSS application already, I'd really rather not have to alter anymore.
Reply With Quote
  #2 (permalink)  
Old 12-28-07, 15:44
joebert joebert is offline
Registered User
 
Join Date: Dec 2007
Location: Clearwater, FL USA
Posts: 2
A reboot after some irrelevant system updates seems to have taken care of the issue.
Reply With Quote
  #3 (permalink)  
Old 12-28-07, 16:12
amthomas amthomas is offline
Registered User
 
Join Date: May 2005
Location: San Antonio, Texas
Posts: 134
I didn't want to comment on this since I don't know about the unix socket stuff, but since you mention a reboot after irrelevant system updates...

maybe you just needed to reload postgres. After you modify the config file you have to do a reload for changes to take effect. Just a thought!

Glad it is working for you.
__________________
Vi veri veniversum vivus vici
By the power of truth, I, a living man, have conquered the universe
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On