Thread: Re: [PATCHES] Avahi support for Postgresql
Am Dienstag, 27. November 2007 schrieb Mathias Hasselmann: > Postmaster already has code to announce its services via DNS-SD > (ZeroConf) by using Apple's Bonjour API. This series of patches > implements that capability on top of the Avahi library[1] which > is free software, available for a wider variety of platforms. Is there a reason we couldn't use the Bonjour compatibility layer offered by Avahi to keep the code differences to a minimum? -- Peter Eisentraut http://developer.postgresql.org/~petere/
Am Montag, den 25.02.2008, 15:05 +0100 schrieb Peter Eisentraut: > Am Dienstag, 27. November 2007 schrieb Mathias Hasselmann: > > Postmaster already has code to announce its services via DNS-SD > > (ZeroConf) by using Apple's Bonjour API. This series of patches > > implements that capability on top of the Avahi library[1] which > > is free software, available for a wider variety of platforms. > > Is there a reason we couldn't use the Bonjour compatibility layer offered by > Avahi to keep the code differences to a minimum? 1) The Avahi's compatibility layer doesn't implement the now deprecated function DNSServiceRegistrationCreate(). 2) Unless DNSServiceRegistrationCreate() installs a lot of black magic, the Bonjour code in postmaster.c has very poor error handling: There seem to be no attempts made to handle name collisions (unless Bonjour does this automatically, of course). Ciao, Mathias -- Mathias Hasselmann <mathias@openismus.com> http://www.openismus.com/ - We can get it done.
Mathias Hasselmann <mathias@openismus.com> writes: > Am Montag, den 25.02.2008, 15:05 +0100 schrieb Peter Eisentraut: >> Is there a reason we couldn't use the Bonjour compatibility layer offered by >> Avahi to keep the code differences to a minimum? > 1) The Avahi's compatibility layer doesn't implement the now deprecated > function DNSServiceRegistrationCreate(). Note that Apple themselves have been deprecating DNSServiceRegistrationCreate for some time: postmaster.c: In function 'PostmasterMain': postmaster.c:856: warning: 'DNSServiceRegistrationCreate' is deprecated (declared at /usr/include/DNSServiceDiscovery/DNSServiceDiscovery.h:139) It's a fairly good bet that the function will disappear entirely from OS X at some point, so we're going to have to change this code soon anyway. What I'd like to know is whether the Avahi API that this patch is using is compatible with whatever Apple is pushing as the not-deprecated API. It would be annoying to tell Mac users that they have to install Avahi to get at functionality that their platform provides natively. regards, tom lane