Re: IPv6 patch

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Rocco Altier <RoccoA(at)Routescape(dot)com>, Nigel Kukard <nkukard(at)lbsd(dot)net>, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: IPv6 patch
Date: 2003-01-07 17:10:02
Message-ID: 200301071710.h07HA2O23814@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Rocco Altier <RoccoA(at)Routescape(dot)com> writes:
> > Another idea is to have the -i take an optional argument. Something where
> > -i means bind to both v4 and v6, and -i4 means to only v4, and -i6 to only
> > v6.
>
> I don't see why we need any such thing. The current behavior of the
> postmaster (assuming -i or tcpip_socket is set) is:
>
> 1. By default: bind to all IPs on the machine.
>
> 2. If virtual_host is set: bind only to that one IP.
>
> It seems to me that in a machine with both v4 and v6 IP addresses, the
> natural extension is that the default behavior is to bind to all of
> them, or if virtual_host is set then bind to only that one, be it v4 or
> v6. (Does the existing patch work with virtual_host identifying a v6
> IP? If not, that's certainly a bug.)
>
> No one has offered any scenario in which it's important to bind to only
> v4 or only v6 addresses when both are present. In the absence of a
> compelling argument why that would be useful, I do not see why we're
> worrying. My own thought is that if I wanted to constrain PG to bind
> to a subset of a machine's addresses, the extension I'd want is to allow
> virtual_host to contain a list of names or IP addresses --- of either
> version. Basing it on v4 versus v6 has no payback that I can see.

The issue was that folks didn't like silent fallback to just IPv4 if the
code supported IPv6 but it didn't bind to IPv6 for some reason, e.g.
kernel doesn't have IPv6 enabled. Right now it puts a message in the
server logs, but others wanted some specific way to enable IPv6 and fail
if it didn't work. They want something that says "I want IPv6 and I
don't want to start if it doesn't start." Right now if we do -i, and
tcpip doesn't start, be bomb out. They want that for IPv6, and the
tricky part is we can't enable that by default because many systems have
the API but no kernel support.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-01-07 17:10:38 Re: IPv6 patch
Previous Message Tom Lane 2003-01-07 17:09:21 Re: PostgreSQL and memory usage