Re: listening addresses - Mailing list pgsql-patches

From Tom Lane
Subject Re: listening addresses
Date
Msg-id 7817.1079909846@sss.pgh.pa.us
Whole thread Raw
In response to Re: listening addresses  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-patches
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
> +      * check if ListenAddresses is empty or all spaces
>>
>> Why do you need this test (or the NetServer bool) at all?  Just scan
>> the string and bind to whatever it mentions.

> It is used in the existing code to test if we can do SSL.

That test seems entirely bogus given the new dispensation that we are
not going to error out on bad entries in listen_addresses.  I'd counsel
just getting rid of it.

>> This seems a bit nonrobust since it will fail if any whitespace is
>> added.  I think it'd be better to test whether any individual hostname
>> extracted from the string is '*'.

> Agree with the first point, disagree with the second. What does it mean
> to specify "12.34.56.78 *"?  I think  "*" should be allowed only if it
> is the only entry in the list.

What does it mean to specify "12.34.56.78 12.34.56.78 12.34.56.78"?
If we want to prevent people from writing redundant listen_addresses
lists, we'll have to work a lot harder than this.  But I don't see the
point of trying.

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] listening addresses
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] 7.4.2 Build broken on (Sparc) Solaris 7 and 8