From: | Chris Campbell <chris(at)bignerdranch(dot)com> |
---|---|
To: | pgsql-patches(at)postgresql(dot)org |
Subject: | Adding Rendezvous support to postmaster |
Date: | 2003-03-27 01:03:35 |
Message-ID: | EF951F70-5FEF-11D7-9D2E-000393147784@bignerdranch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
pgsql-HEAD-rendezvous.diff | application/octet-stream | 3.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Campbell | 2003-03-27 05:04:02 | Adding Rendezvous support to postmaster |
Previous Message | Gary Hendricks | 2003-03-26 22:30:07 | Does anyone know of a good PostgreSQL book for intermediate level? |