Skip site navigation (1) Skip section navigation (2)

Re: Ability to listen on two unix sockets

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Honza Horak <hhorak(at)redhat(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Ability to listen on two unix sockets
Date: 2012-07-03 16:28:19
Message-ID: CAD5tBcLtUN+aGnPTPBiHmwcRR05fYiNbdB7zAXNiHAR+oHnmxQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Tue, Jul 3, 2012 at 11:51 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> I wrote:
> > On the whole I prefer the solution you mention above: let's generalize
> > the postmaster.pid format (and pg_ctl) so that we don't need to assume
> > anything about port numbers matching up.  The nearby discussion about
> > allowing listen_addresses to specify port number would break this
> > assumption anyway.  If we just add two port numbers into postmaster.pid,
> > one for the Unix socket and one for the TCP port, we could get rid of
> > the problem entirely.
>
> After further thought, I think that this approach would make it a good
> idea to drop support for alternate port numbers from the present patch.
> Let's just deal with alternate socket directories for now.  There could
> be a follow-on patch that adds support for nondefault port numbers in
> both listen_addresses and unix_socket_directories, and fixes up the
> postmaster.pid format to support that.
>
> I will admit that part of my desire to do it this way is a narrow Fedora
> rationale: in the Fedora package, we are going to want to back-patch the
> alternate-directory feature into 9.2 (and maybe 9.1) so as to fix our
> problems with systemd's PrivateTmp feature.  The alternate-port-number
> feature is not necessary for that, and leaving it out would make for a
> significantly smaller back-patch.  But in any case, it seems like adding
> alternate-port-number support for Unix sockets and not doing it for TCP
> ports at the same time is just weird.  So I think it's a separate
> feature and should be a separate patch.
>
>

+1

I still find it difficult to think of a good use case for multiple ports.

cheers

andrew

In response to

pgsql-hackers by date

Next:From: Pavel StehuleDate: 2012-07-03 16:35:51
Subject: Re: enhanced error fields
Previous:From: Pavel StehuleDate: 2012-07-03 16:26:57
Subject: Re: enhanced error fields

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group