Got it. Thanks for the testing.  Patch attached and applied.

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

Chris Campbell wrote:
> OK, compiled and tested. Looks good. One modification to your patch:  
> there's a line that says "if (service_name != NULL)" -- that should be  
> "if (rendezvous_name != NULL)" since that variable's been renamed.  
> Change that, and I'm happy.
> 
> Thanks!
> 
> - Chris
> 
> On Monday, Jul 21, 2003, at 23:50 US/Eastern, Bruce Momjian wrote:
> 
> > OK, new patch attached, with the adjustment you suggested.  We do
> > probably have a few days to resolve this, but if we run out of time, I
> > will drop it like a hot potato and keep it for 7.5.  :-)
> >
> > ----------------------------------------------------------------------- 
> > ----
> >
> > Chris Campbell wrote:
> >> On Monday, Jul 21, 2003, at 21:17 US/Eastern, Bruce Momjian wrote:
> >>
> >>> Again, why does the current code pass NULL as the first param ---  
> >>> that
> >>> was from your orignal patch.
> >>
> >> The original patch passed the service_name variable (which you've now
> >> renamed rendezvous_name) as the first parameter. I'm not sure how that
> >> NULL got there. You're correct: the first parameter is the string to
> >> use as the service name. To use the default (the Computer Name), ""
> >> should be passed (the empty string). Which, if rendezvous_name  
> >> defaults
> >> to "", means that rendezvous_name should be passed in all cases.
> >>
> >>> I figure because we have a Rendezvous config param, then they want it
> >>> on
> >>> by default.
> >>
> >> I agree with that thinking. In my original patch, I required that a
> >> "service_name =" directive be in the config file to turn on Rendezvous
> >> service advertisement, and that "service_name = """ be in there to use
> >> the default service name (the Computer Name), but I like this way
> >> better: always advertise a service (if HAVE_RENDEZVOUS is defined) and
> >> use the default service name ("") unless a service name is configured
> >> with rendezvous_name = in the config file.
> >>
> >> I like it. I'll check out your pointers on getting initdb to work in  
> >> OS
> >> X, make sure I've got a good looking patch, then mail you a patch to
> >> HEAD. Probably tomorrow? That work?
> >>

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: doc/src/sgml/runtime.sgml
===================================================================
RCS file: /cvsroot/pgsql-server/doc/src/sgml/runtime.sgml,v
retrieving revision 1.193
diff -c -c -r1.193 runtime.sgml
*** doc/src/sgml/runtime.sgml   14 Jul 2003 20:00:22 -0000      1.193
--- doc/src/sgml/runtime.sgml   22 Jul 2003 03:41:50 -0000
***************
*** 732,737 ****
--- 732,747 ----
        </listitem>
       </varlistentry>
       
+      <varlistentry>
+       <term><varname>RENDEZVOUS_NAME</varname> (<type>string</type>)</term>
+       <listitem>
+        <para>
+         Specifies the Rendezvous broadcast name.  By default, the
+         computer name is used, specified as ''.
+        </para>
+       </listitem>
+      </varlistentry>
+      
       </variablelist>
       </sect3>
       <sect3 id="runtime-config-connection-security">
Index: src/backend/postmaster/postmaster.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/postmaster/postmaster.c,v
retrieving revision 1.333
diff -c -c -r1.333 postmaster.c
*** src/backend/postmaster/postmaster.c 12 Jun 2003 07:36:51 -0000      1.333
--- src/backend/postmaster/postmaster.c 22 Jul 2003 03:41:54 -0000
***************
*** 210,215 ****
--- 210,217 ----
  bool          Log_connections = false;
  bool          Db_user_namespace = false;
  
+ char          *rendezvous_name;
+ 
  /* For FNCTL_NONBLOCK */
  #if defined(WIN32) || defined(__BEOS__)
  long ioctlsocket_ret;
***************
*** 756,772 ****
                                        "socket.");
                        }
                }
! #ifdef USE_RENDEZVOUS                    
!                 if (service_name != NULL)
!                 {
!                         DNSServiceRegistrationCreate(NULL,    /* default to hostname 
*/
!                                                      "_postgresql._tcp.",
!                                                      "",
!                                                      htonl(PostPortNumber),
!                                                      "",
!                                                      
(DNSServiceRegistrationReply)reg_reply,
!                                                      NULL);
!                 }
  #endif
        }
  
--- 758,774 ----
                                        "socket.");
                        }
                }
! #ifdef USE_RENDEZVOUS                                  
!                               if (rendezvous_name != NULL)
!                               {
!                                               
DNSServiceRegistrationCreate(rendezvous_name,
!                                                                                      
                  "_postgresql._tcp.",
!                                                                                      
                  "",
!                                                                                      
                  htonl(PostPortNumber),
!                                                                                      
                  "",
!                                                                                      
                  (DNSServiceRegistrationReply)reg_reply,
!                                                                                      
                  NULL);
!                               }
  #endif
        }
  
Index: src/backend/utils/misc/guc.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/utils/misc/guc.c,v
retrieving revision 1.137
diff -c -c -r1.137 guc.c
*** src/backend/utils/misc/guc.c        15 Jul 2003 19:19:56 -0000      1.137
--- src/backend/utils/misc/guc.c        22 Jul 2003 03:41:59 -0000
***************
*** 1299,1304 ****
--- 1299,1313 ----
                PG_KRB_SRVTAB, NULL, NULL
        },
  
+       {
+               {"rendezvous_name", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
+                       gettext_noop("The Rendezvous broadcast service name"),
+                       NULL
+               },
+               &rendezvous_name,
+               "", NULL, NULL
+       },
+ 
        /* See main.c about why defaults for LC_foo are not all alike */
  
        {
Index: src/backend/utils/misc/postgresql.conf.sample
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/utils/misc/postgresql.conf.sample,v
retrieving revision 1.85
diff -c -c -r1.85 postgresql.conf.sample
*** src/backend/utils/misc/postgresql.conf.sample       18 Jul 2003 19:16:03 -0000     
 1.85
--- src/backend/utils/misc/postgresql.conf.sample       22 Jul 2003 03:41:59 -0000
***************
*** 38,43 ****
--- 38,44 ----
  #unix_socket_group = ''
  #unix_socket_permissions = 0777       # octal
  #virtual_host = ''
+ #rendezvous_name = ''         # defaults to the computer name
  
  # - Security & Authentication -
  
Index: src/include/tcop/tcopprot.h
===================================================================
RCS file: /cvsroot/pgsql-server/src/include/tcop/tcopprot.h,v
retrieving revision 1.57
diff -c -c -r1.57 tcopprot.h
*** src/include/tcop/tcopprot.h 5 May 2003 00:44:56 -0000       1.57
--- src/include/tcop/tcopprot.h 22 Jul 2003 03:42:00 -0000
***************
*** 32,37 ****
--- 32,38 ----
  extern bool log_hostname;
  extern bool LogSourcePort;
  extern DLLIMPORT const char *debug_query_string;
+ extern char *rendezvous_name;
  
  #ifndef BOOTSTRAP_INCLUDE
  
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to