Re: Ability to listen on two unix sockets

From: Honza Horak <hhorak(at)redhat(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Florian Pflug <fgp(at)phlo(dot)org>
Subject: Re: Ability to listen on two unix sockets
Date: 2012-06-07 15:47:20
Message-ID: 4FD0CD08.6090003@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 06/06/2012 04:50 PM, Andres Freund wrote:
> On Wednesday, June 06, 2012 04:38:42 PM Tom Lane wrote:
>> You might think we should design this exactly like the TCP-socket
>> multiple-listen-addresses case, ie just have a config variable
>> containing a list of directory names. The sticking point there is
>> that the directories aren't really interchangeable. In particular,
>> there is still going to be one directory that is the one hard-wired
>> into libpq.
> I wonder if the whole issue doesn't require libpq to also try multiple
> hardcoded socket locations.

I guess so. Let's say we add additional socket support and some server
uses one e.g. at /var/run/postgresql. Then a client can either (1)
specify the same path explicitly and then we don't need to specify any
additional sockets on the client side or (2) stick to the default path,
which is hard-coded, currently to /tmp.

Going back to the original problem (inaccessible /tmp directory), it is
the case (2) -- a client uses the default path. So any additional
client-side socket option won't probably help here, but we would
probably need a second hard-coded path e.g. at /var/run/postgresql.

Regards,
Honza

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-06-07 15:47:59 Re: Avoiding adjacent checkpoint records
Previous Message Heikki Linnakangas 2012-06-07 15:35:11 Re: XLog changes for 9.3