Re: unix_socket_group problem - Mailing list pgsql-admin

From Tom Lane
Subject Re: unix_socket_group problem
Date
Msg-id 5115.1258133913@sss.pgh.pa.us
Whole thread Raw
In response to Re: unix_socket_group problem  (Joe Miller <joe.d.miller@gmail.com>)
Responses Re: unix_socket_group problem  (Joe Miller <joe.d.miller@gmail.com>)
List pgsql-admin
Joe Miller <joe.d.miller@gmail.com> writes:
> If I set this:

> unix_socket_group = 'myadmin'
> unix_socket_permissions = 0777

> ...connection is refused for all accounts.

Have you checked the postmaster's log to see if it's reporting any
problems?  I'm wondering if the chown() call is failing.  Perhaps
postgres isn't a member of myadmin?

Some experimentation shows that if we fail to set the requested group or
permissions on the socket, the postmaster closes the socket and hence
ignores any connection attempts through it, but the socket file is not
physically unlinked until postmaster shutdown.  So that seems consistent
with your results, but there ought to be a complaint about it in the
postmaster log.

(I'm not sure whether it's worth the trouble, or even a good idea,
to unlink earlier in this situation.  The presence of the socket file
is partially a guard against starting another postmaster on the same
port number, which seems like a good thing.)

            regards, tom lane

pgsql-admin by date:

Previous
From: Joe Miller
Date:
Subject: Re: unix_socket_group problem
Next
From: Joe Miller
Date:
Subject: Re: unix_socket_group problem