Add GUC parameter to control rendezvous name.
authorBruce Momjian
Tue, 22 Jul 2003 20:29:13 +0000 (20:29 +0000)
committerBruce Momjian
Tue, 22 Jul 2003 20:29:13 +0000 (20:29 +0000)
doc/src/sgml/runtime.sgml
src/backend/postmaster/postmaster.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/include/tcop/tcopprot.h

index 39057f0652bca0ff83d80f4c6d086cd5140eea91..bab8d2751d40bc1b6809842af507670c7dee3fec 100644 (file)
@@ -1,5 +1,5 @@
 
 
 
@@ -732,6 +732,16 @@ SET ENABLE_SEQSCAN TO OFF;
       
      
      
+     
+      RENDEZVOUS_NAME (string)
+      
+       
+        Specifies the Rendezvous broadcast name.  By default, the
+        computer name is used, specified as ''.
+       
+      
+     
+     
      
      
      
index ec98fc6f53840f1f1a9cf624068aa0decc584603..614c76e64eeff63e7c7f4eca1a9c04f1a0dc91ed 100644 (file)
@@ -37,7 +37,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.334 2003/07/22 19:00:10 tgl Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.335 2003/07/22 20:29:13 momjian Exp $
  *
  * NOTES
  *
@@ -210,6 +210,8 @@ bool        LogSourcePort;
 bool       Log_connections = false;
 bool       Db_user_namespace = false;
 
+char       *rendezvous_name;
+
 /* For FNCTL_NONBLOCK */
 #if defined(WIN32) || defined(__BEOS__)
 long ioctlsocket_ret;
@@ -771,17 +773,17 @@ PostmasterMain(int argc, char *argv[])
                    "socket.");
            }
        }
-#ifdef USE_RENDEZVOUS                    
-                if (service_name != NULL)
-                {
-                        DNSServiceRegistrationCreate(NULL, /* default to hostname */
-                                                     "_postgresql._tcp.",
-                                                     "",
-                                                     htonl(PostPortNumber),
-                                                     "",
-                                                     (DNSServiceRegistrationReply)reg_reply,
-                                                     NULL);
-                }
+#ifdef USE_RENDEZVOUS                   
+               if (rendezvous_name != NULL)
+               {
+                       DNSServiceRegistrationCreate(rendezvous_name,
+                                                    "_postgresql._tcp.",
+                                                    "",
+                                                    htonl(PostPortNumber),
+                                                    "",
+                                                    (DNSServiceRegistrationReply)reg_reply,
+                                                    NULL);
+               }
 #endif
    }
 
index 8138c46918d6d6f435a2f2663ffa56028fb9f725..3a3d64b256b919c32534c3a731fbb2240dccbd17 100644 (file)
@@ -10,7 +10,7 @@
  * Written by Peter Eisentraut .
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.137 2003/07/15 19:19:56 tgl Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.138 2003/07/22 20:29:13 momjian Exp $
  *
  *--------------------------------------------------------------------
  */
@@ -1299,6 +1299,15 @@ static struct config_string ConfigureNamesString[] =
        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 b3c1ad7f5b85c01240ec94d91105785e4418847f..584e24f42879104ab0ae61f8e4c3e4d1677310d8 100644 (file)
@@ -38,6 +38,7 @@
 #unix_socket_group = ''
 #unix_socket_permissions = 0777    # octal
 #virtual_host = ''
+#rendezvous_name = ''      # defaults to the computer name
 
 # - Security & Authentication -
 
index b5e171e1d36b9f98c69377ccd7162ecfc6c4e693..ee2e4391fb5ad628d4f2865af7e823fbd972b861 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: tcopprot.h,v 1.57 2003/05/05 00:44:56 tgl Exp $
+ * $Id: tcopprot.h,v 1.58 2003/07/22 20:29:13 momjian Exp $
  *
  * OLD COMMENTS
  *   This file was created so that other c files could get the two
@@ -32,6 +32,7 @@ extern CommandDest whereToSendOutput;
 extern bool log_hostname;
 extern bool LogSourcePort;
 extern DLLIMPORT const char *debug_query_string;
+extern char *rendezvous_name;
 
 #ifndef BOOTSTRAP_INCLUDE