Skip to content

Commit a0cc9f3

Browse files
committed
Add GUC parameter to control rendezvous name.
1 parent 25114d3 commit a0cc9f3

File tree

5 files changed

+38
-15
lines changed

5 files changed

+38
-15
lines changed

doc/src/sgml/runtime.sgml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.193 2003/07/14 20:00:22 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.194 2003/07/22 20:29:13 momjian Exp $
33
-->
44

55
<Chapter Id="runtime">
@@ -732,6 +732,16 @@ SET ENABLE_SEQSCAN TO OFF;
732732
</listitem>
733733
</varlistentry>
734734

735+
<varlistentry>
736+
<term><varname>RENDEZVOUS_NAME</varname> (<type>string</type>)</term>
737+
<listitem>
738+
<para>
739+
Specifies the Rendezvous broadcast name. By default, the
740+
computer name is used, specified as ''.
741+
</para>
742+
</listitem>
743+
</varlistentry>
744+
735745
</variablelist>
736746
</sect3>
737747
<sect3 id="runtime-config-connection-security">

src/backend/postmaster/postmaster.c

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.334 2003/07/22 19:00:10 tgl Exp $
40+
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.335 2003/07/22 20:29:13 momjian Exp $
4141
*
4242
* NOTES
4343
*
@@ -210,6 +210,8 @@ bool LogSourcePort;
210210
bool Log_connections = false;
211211
bool Db_user_namespace = false;
212212

213+
char *rendezvous_name;
214+
213215
/* For FNCTL_NONBLOCK */
214216
#if defined(WIN32) || defined(__BEOS__)
215217
long ioctlsocket_ret;
@@ -771,17 +773,17 @@ PostmasterMain(int argc, char *argv[])
771773
"socket.");
772774
}
773775
}
774-
#ifdef USE_RENDEZVOUS
775-
if (service_name != NULL)
776-
{
777-
DNSServiceRegistrationCreate(NULL, /* default to hostname */
778-
"_postgresql._tcp.",
779-
"",
780-
htonl(PostPortNumber),
781-
"",
782-
(DNSServiceRegistrationReply)reg_reply,
783-
NULL);
784-
}
776+
#ifdef USE_RENDEZVOUS
777+
if (rendezvous_name != NULL)
778+
{
779+
DNSServiceRegistrationCreate(rendezvous_name,
780+
"_postgresql._tcp.",
781+
"",
782+
htonl(PostPortNumber),
783+
"",
784+
(DNSServiceRegistrationReply)reg_reply,
785+
NULL);
786+
}
785787
#endif
786788
}
787789

src/backend/utils/misc/guc.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.137 2003/07/15 19:19:56 tgl Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.138 2003/07/22 20:29:13 momjian Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -1299,6 +1299,15 @@ static struct config_string ConfigureNamesString[] =
12991299
PG_KRB_SRVTAB, NULL, NULL
13001300
},
13011301

1302+
{
1303+
{"rendezvous_name", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
1304+
gettext_noop("The Rendezvous broadcast service name"),
1305+
NULL
1306+
},
1307+
&rendezvous_name,
1308+
"", NULL, NULL
1309+
},
1310+
13021311
/* See main.c about why defaults for LC_foo are not all alike */
13031312

13041313
{

src/backend/utils/misc/postgresql.conf.sample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#unix_socket_group = ''
3939
#unix_socket_permissions = 0777 # octal
4040
#virtual_host = ''
41+
#rendezvous_name = '' # defaults to the computer name
4142

4243
# - Security & Authentication -
4344

src/include/tcop/tcopprot.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: tcopprot.h,v 1.57 2003/05/05 00:44:56 tgl Exp $
10+
* $Id: tcopprot.h,v 1.58 2003/07/22 20:29:13 momjian Exp $
1111
*
1212
* OLD COMMENTS
1313
* This file was created so that other c files could get the two
@@ -32,6 +32,7 @@ extern CommandDest whereToSendOutput;
3232
extern bool log_hostname;
3333
extern bool LogSourcePort;
3434
extern DLLIMPORT const char *debug_query_string;
35+
extern char *rendezvous_name;
3536

3637
#ifndef BOOTSTRAP_INCLUDE
3738

0 commit comments

Comments
 (0)