Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group