Re: unix_socket_group problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Miller <joe(dot)d(dot)miller(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: unix_socket_group problem
Date: 2009-11-13 17:38:33
Message-ID: 5115.1258133913@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Joe Miller <joe(dot)d(dot)miller(at)gmail(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Joe Miller 2009-11-13 17:58:34 Re: unix_socket_group problem
Previous Message Joe Miller 2009-11-13 17:08:47 Re: unix_socket_group problem