Re: Ability to listen on two unix sockets - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Ability to listen on two unix sockets
Date
Msg-id CAD5tBcLtUN+aGnPTPBiHmwcRR05fYiNbdB7zAXNiHAR+oHnmxQ@mail.gmail.com
Whole thread Raw
In response to Re: Ability to listen on two unix sockets  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
<br /><br /><div class="gmail_quote">On Tue, Jul 3, 2012 at 11:51 AM, Tom Lane <span dir="ltr"><<a
href="mailto:tgl@sss.pgh.pa.us"target="_blank">tgl@sss.pgh.pa.us</a>></span> wrote:<br /><blockquote
class="gmail_quote"style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">I wrote:<br />
>On the whole I prefer the solution you mention above: let's generalize<br /> > the postmaster.pid format (and
pg_ctl)so that we don't need to assume<br /> > anything about port numbers matching up.  The nearby discussion
about<br/> > allowing listen_addresses to specify port number would break this<br /> > assumption anyway.  If we
justadd two port numbers into postmaster.pid,<br /> > one for the Unix socket and one for the TCP port, we could get
ridof<br /> > the problem entirely.<br /><br /></div>After further thought, I think that this approach would make it
agood<br /> idea to drop support for alternate port numbers from the present patch.<br /> Let's just deal with
alternatesocket directories for now.  There could<br /> be a follow-on patch that adds support for nondefault port
numbersin<br /> both listen_addresses and unix_socket_directories, and fixes up the<br /> postmaster.pid format to
supportthat.<br /><br /> I will admit that part of my desire to do it this way is a narrow Fedora<br /> rationale: in
theFedora package, we are going to want to back-patch the<br /> alternate-directory feature into 9.2 (and maybe 9.1) so
asto fix our<br /> problems with systemd's PrivateTmp feature.  The alternate-port-number<br /> feature is not
necessaryfor that, and leaving it out would make for a<br /> significantly smaller back-patch.  But in any case, it
seemslike adding<br /> alternate-port-number support for Unix sockets and not doing it for TCP<br /> ports at the same
timeis just weird.  So I think it's a separate<br /> feature and should be a separate patch.<br /><div
class="HOEnZb"><divclass="h5">                       <br /></div></div></blockquote></div><br />+1<br /><br />I still
findit difficult to think of a good use case for multiple ports.<br /><br />cheers<br /><br />andrew<br /> 

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: enhanced error fields
Next
From: Pavel Stehule
Date:
Subject: Re: enhanced error fields