Re: Patch: update Bonjour support to the newer non-deprecated API - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Patch: update Bonjour support to the newer non-deprecated API
Date
Msg-id 7268.1252342237@sss.pgh.pa.us
Whole thread Raw
In response to Re: Patch: update Bonjour support to the newer non-deprecated API  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Patch: update Bonjour support to the newer non-deprecated API
Re: Patch: update Bonjour support to the newer non-deprecated API
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> *** WARNING *** The program 'postgres' uses the Apple Bonjour compatibility layer of Avahi.
> *** WARNING *** Please fix your application to use the native API of Avahi!
> *** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=postgres>
> LOG:  DNSServiceRegister() failed: error code -65540

Hmm, I read in their documentation that the dns_sd.h interface was
deprecated, but not that it had been intentionally disabled.
Seems like they want to drive users away rather than attract them.

> So we're not better than when we started, but it doesn't cause any
> problem if not enabled.

The patch as I gave it intentionally didn't change any user-visible
behavior, but one thing that is bothering me is that if USE_BONJOUR
is selected, the postmaster will *always* try to advertise itself
via DNS-SD.  There's no provision for enabling the feature or not
at run time, which is a bad thing for packagers: they have to decide
for their users whether to turn it on.  There was discussion in
connection with the Avahi patch last year to the effect that some
people thought advertising the postmaster might be a security issue
for them.  So I'm thinking we ought to fix that while we're messing
with it.

The two possibilities for that seem to be to change the meaning of
bonjour_name = '' (have it mean "no advertisement" instead of
"default to service name = computer's name"), or to add a separate
boolean GUC.  If the latter, is the default 'on' or 'off'?  Opinions?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Patch: update Bonjour support to the newer non-deprecated API
Next
From: David Fetter
Date:
Subject: Re: Triggers on columns