Adding Rendezvous support to postmaster - Mailing list pgsql-patches

From Chris Campbell
Subject Adding Rendezvous support to postmaster
Date
Msg-id EF951F70-5FEF-11D7-9D2E-000393147784@bignerdranch.com
Whole thread Raw
List pgsql-patches
The attached diffs against the top of the CVS tree 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 those services 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 of the service
advertised. 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 some other 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 -- but
the world keeps turning as far as postmaster is concerned.

There's very little code involved here: just 1 function call in
PostmasterMain() after postmaster has started listening on an INET
socket. And 1 addition to the GUC list of configuration variables.

All the code is #ifdef'ed inside HAVE_RENDEZVOUS, which is only
#define'd in the src/include/port/darwin.h file.

Please send any comments or questions to me directly or the hackers
list; I'm not currently on the pgsql-patches list.

Thanks!

- Chris


Attachment

pgsql-patches by date:

Previous
From: "Gary Hendricks"
Date:
Subject: Does anyone know of a good PostgreSQL book for intermediate level?
Next
From: Chris Campbell
Date:
Subject: Adding Rendezvous support to postmaster