Re: [HACKERS] Avahi support for Postgresql

From: Mathias Hasselmann <mathias(at)openismus(dot)com>
To: tomas(at)tuxteam(dot)de
Cc: pgsql-patches(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org, Murray Cumming <murrayc(at)openismus(dot)com>
Subject: Re: [HACKERS] Avahi support for Postgresql
Date: 2008-04-01 15:07:31
Message-ID: 1207062451.8343.25.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


Am Dienstag, den 01.04.2008, 12:02 +0000 schrieb tomas(at)tuxteam(dot)de:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Tue, Apr 01, 2008 at 09:35:56AM +0200, Mathias Hasselmann wrote:
> > Am Samstag, den 29.03.2008, 12:25 +0000 schrieb tomas(at)tuxteam(dot)de:
> > [...]
> > > Sorry for a dumb question, but I couldn't figure that out from your
> > > references [1]..[4]: does that mean that the PostgreSQL server would
> > > "advertise itself" on the local net? Or what is the purpose of liking-in
> > > libavahi into the postmaster?
> >
> > Yes, that's the purpose.
> >
> > > Surely one wouldn't want this in a data center?
> >
> > Yes, this feature definitely targets small-office use, personal use, DB
> > developers [...]
> > Still you can tell Avahi to explicitly announce at a certain, non-local
> > domain, but this feature is not implemented by the patch. Maybe database
> > developers in large network environments could make use of such
> > announcements. It would be trivial to add.
>
> Personally, I'be rather scared than delighted ;-)

So in data centers you don't even trust the machines in your broadcast
domain?

> > > Is there a possiblity to disable that at run time?
> >
> > The feature is disabled by default. As long as you do not specify a
> > zeroconf_name in your configuration file, nothing happens. This is the
> > same behavior as established by the Bonjour code.
>
> Thanks, good to know.
>
> Isn't there a less-intrusive option to linking a lib into each and every
> possible server, like a config file in which to put what is to be announced?

You could directly talk to the D-Bus interface of Avahi. libavahi-client
just is a convenience wrapper. Well, but this route will be much more
cumbersome.

One other route is calling avahi-publish-service on startup and killing
it on shutdown, but: avahi-publish-service really only exists for
demonstration purposes and doesn't handle service name collisions for
instance. I don't believe that a high-profile application like
Postgresql should rely on low-quality hacks, like invoking educational
demo programs.

Ciao,
Mathias
--
Mathias Hasselmann <mathias(at)openismus(dot)com>
http://www.openismus.com/ - We can get it done.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message tomas 2008-04-01 15:34:33 Re: [HACKERS] Avahi support for Postgresql
Previous Message Tom Lane 2008-04-01 15:00:15 Re: [HACKERS] ANALYZE getting dead tuple count hopelessly wrong

Browse pgsql-patches by date

  From Date Subject
Next Message tomas 2008-04-01 15:34:33 Re: [HACKERS] Avahi support for Postgresql
Previous Message Bernd Helmle 2008-04-01 14:36:34 psql command aliases support