Re: Adding Rendezvous support to postmaster

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Chris Campbell <chris(at)bignerdranch(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Adding Rendezvous support to postmaster
Date: 2003-06-11 06:59:49
Message-ID: 200306110659.h5B6xnP11693@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


I have applied the attached Rendezvous patch.

Per suggestion from Peter, a --with-rendezvous flag was added to
configure. This is similar to the PAM flag we already have.

I also _didn't_ add the Rendezvous GUC variable, so we default to the
host name. If there is need, we can add it later.

---------------------------------------------------------------------------

Chris Campbell wrote:
> The attached diffs add Rendezvous support to postmaster when it's
> running on Darwin (Mac OS X).
>
> Rendezvous allows services (such as a database server) to advertise
> their availability to other hosts on their link-local network, and
> client programs to browse the services on the network to see what's
> available. It is Apple's implementation of ZEROCONF.
>
> http://developer.apple.com/macosx/rendezvous/
>
> This allows client programs running on computers that are on the same
> link-local network as the postgresql server to automatically find the
> server's IP address and port number. This adds great ease-of-use for
> end users.
>
> I propose adding a configuration variable to postgresql.conf called
> "service_name" that allows the user to specify the name used to
> advertise the database service. If this variable isn't defined in the
> postgresql.conf file, then no service is advertised. If it is '', then
> the computer's "Rendezvous Name" is used (this is similar to the
> hostname, see the link below for more info). Otherwise, if it's a
> non-empty string, that string is used as the name of the service.
>
> http://developer.apple.com/qa/qa2001/qa1228.html
>
> If there's already a service on the network with that name, then the
> service registration silently fails and no service is registered.
>
> Rendezvous also has the notion of a service type string. It's a bit
> like a domain name: I suggest we use "_pgsql._tcp." (another example
> would be "_ftp._tcp.").
>
> There's very little code involved: just 1 function call in
> PostmasterMain() after postmaster has started listening on a TCP
> socket. And 1 addition to the GUC list of configuration variables.
>
> All the code is #ifdef'ed inside HAVE_RENDEZVOUS, which is only defined
> in src/include/port/darwin.h. Even once we know the OS is darwin, we
> still need to check to make sure that Rendezvous is available, either
> by OS version, or by checking for the existence of a needed header
> file, etc.
>
> I've included patches for CVS top-of-tree and postgresql-7.3.2.
>
> Thanks!
>
> - Chris
>

[ Attachment, skipping... ]

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 12.1 KB

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2003-06-11 07:07:15 Re: Adding Rendezvous support to postmaster
Previous Message Bruce Momjian 2003-06-11 05:14:12 Re: [HACKERS] patch src/bin/psql/help.c