Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
76920de8
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
76920de8
编写于
11月 15, 2000
作者:
P
Peter Eisentraut
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename parameter "hostname" to "virtual_host". Seemed very ambiguous...
上级
85b762b4
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
48 addition
and
43 deletion
+48
-43
doc/src/sgml/runtime.sgml
doc/src/sgml/runtime.sgml
+33
-28
src/backend/postmaster/postmaster.c
src/backend/postmaster/postmaster.c
+11
-11
src/backend/utils/misc/guc.c
src/backend/utils/misc/guc.c
+2
-2
src/include/libpq/pqcomm.h
src/include/libpq/pqcomm.h
+2
-2
未找到文件。
doc/src/sgml/runtime.sgml
浏览文件 @
76920de8
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.3
6 2000/11/14 19:13:26
petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.3
7 2000/11/15 18:36:03
petere Exp $
-->
<Chapter Id="runtime">
...
...
@@ -932,33 +932,6 @@ env PGOPTIONS='-c geqo=off' psql
</listitem>
</varlistentry>
<varlistentry>
<term>HOSTNAME (<type>string</type>)</term>
<listitem>
<para>
Specifies the TCP/IP hostname or address on which the
<application>postmaster</application> is to listen for
connections from client applications. Defaults to the value
of the <envar>PGHOST</envar> environment variable, or if
<envar>PGHOST</envar> is not set, it defaults to listening on
all configured addresses (including localhost).
</para>
<para>
If you use a hostname do not try to run multiple instances of
<application>postmaster</application> on the same IP address
but different ports. Doing so will result in them attempting
(incorrectly) to use the same shared memory segments. Also,
if you use a hostname, all of the host's IP addresses on which
<application>postmaster</application> instances are listening
must be distinct in the two last octets.
</para>
<para>
If you do not use this option, then each instance must listen
on a different port.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>KRB_SERVER_KEYFILE (<type>string</type>)</term>
<listitem>
...
...
@@ -1151,6 +1124,33 @@ env PGOPTIONS='-c geqo=off' psql
</listitem>
</varlistentry>
<varlistentry>
<term>VIRTUAL_HOST (<type>string</type>)</term>
<listitem>
<para>
Specifies the TCP/IP hostname or address on which the
<application>postmaster</application> is to listen for
connections from client applications. Defaults to the value
of the <envar>PGHOST</envar> environment variable, or if
<envar>PGHOST</envar> is not set, it defaults to listening on
all configured addresses (including localhost).
</para>
<para>
If you use a hostname do not try to run multiple instances of
<application>postmaster</application> on the same IP address
but different ports. Doing so will result in them attempting
(incorrectly) to use the same shared memory segments. Also,
if you use a hostname, all of the host's IP addresses on which
<application>postmaster</application> instances are listening
must be distinct in the two last octets.
</para>
<para>
If you do not use this option, then each instance must listen
on a different port.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</sect2>
...
...
@@ -1189,6 +1189,11 @@ env PGOPTIONS='-c geqo=off' psql
<entry>fsync = off</entry>
<entry></entry>
</row>
<row>
<entry>-h <replaceable>x</replaceable></entry>
<entry>virtual_host = <replaceable>x</replaceable></entry>
<entry></entry>
</row>
<row>
<entry>-i</entry>
<entry>tcpip_socket = on</entry>
...
...
src/backend/postmaster/postmaster.c
浏览文件 @
76920de8
...
...
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.18
7 2000/11/14 18:37:42 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.18
8 2000/11/15 18:36:04 petere
Exp $
*
* NOTES
*
...
...
@@ -115,7 +115,7 @@ static Dllist *PortList;
/* The socket number we are listening for connections on */
int
PostPortNumber
;
char
*
UnixSocketName
;
char
*
HostName
;
char
*
Virtual_host
;
/*
* This is a sequence number that indicates how many times we've had to
...
...
@@ -453,7 +453,7 @@ PostmasterMain(int argc, char *argv[])
enableFsync
=
false
;
break
;
case
'h'
:
HostName
=
optarg
;
Virtual_host
=
optarg
;
break
;
case
'i'
:
NetServer
=
true
;
...
...
@@ -609,7 +609,7 @@ PostmasterMain(int argc, char *argv[])
if
(
NetServer
)
{
status
=
StreamServerPort
(
AF_INET
,
HostName
,
status
=
StreamServerPort
(
AF_INET
,
Virtual_host
,
(
unsigned
short
)
PostPortNumber
,
UnixSocketName
,
&
ServerSock_INET
);
if
(
status
!=
STATUS_OK
)
...
...
@@ -621,7 +621,7 @@ PostmasterMain(int argc, char *argv[])
}
#ifdef HAVE_UNIX_SOCKETS
status
=
StreamServerPort
(
AF_UNIX
,
HostName
,
status
=
StreamServerPort
(
AF_UNIX
,
Virtual_host
,
(
unsigned
short
)
PostPortNumber
,
UnixSocketName
,
&
ServerSock_UNIX
);
if
(
status
!=
STATUS_OK
)
...
...
@@ -794,7 +794,7 @@ usage(const char *progname)
printf
(
" -d 1-5 debugging level
\n
"
);
printf
(
" -D DATADIR database directory
\n
"
);
printf
(
" -F turn fsync off
\n
"
);
printf
(
" -h HOSTNAME host name or IP address to listen
to
\n
"
);
printf
(
" -h HOSTNAME host name or IP address to listen
on
\n
"
);
printf
(
" -i enable TCP/IP connections
\n
"
);
printf
(
" -k FILENAME Unix domain socket location
\n
"
);
#ifdef USE_SSL
...
...
@@ -1311,7 +1311,7 @@ ConnFree(Port *conn)
/*
* get_host_port -- return a pseudo port number (16 bits)
* derived from the primary IP address of
HostName
.
* derived from the primary IP address of
Virtual_host
.
*/
static
unsigned
short
get_host_port
(
void
)
...
...
@@ -1323,13 +1323,13 @@ get_host_port(void)
SockAddr
saddr
;
struct
hostent
*
hp
;
hp
=
gethostbyname
(
HostName
);
hp
=
gethostbyname
(
Virtual_host
);
if
((
hp
==
NULL
)
||
(
hp
->
h_addrtype
!=
AF_INET
))
{
char
msg
[
1024
];
snprintf
(
msg
,
sizeof
(
msg
),
"FATAL: get_host_port: gethostbyname(%s) failed
\n
"
,
HostName
);
Virtual_host
);
fputs
(
msg
,
stderr
);
pqdebug
(
"%s"
,
msg
);
exit
(
1
);
...
...
@@ -1362,7 +1362,7 @@ reset_shared(unsigned short port)
* the -h option, or set PGHOST, to a value other than the internal
* default.
*
* If
HostName
is set, then we generate the IPC keys using the
* If
Virtual_host
is set, then we generate the IPC keys using the
* last two octets of the IP address instead of the port number.
* This algorithm assumes that no one will run multiple PostgreSQL
* instances on one host using two IP addresses that have the same two
...
...
@@ -1376,7 +1376,7 @@ reset_shared(unsigned short port)
* host.
*/
if
(
HostName
[
0
]
!=
'\0'
)
if
(
Virtual_host
[
0
]
!=
'\0'
)
port
=
get_host_port
();
ipc_key
=
port
*
1000
+
shmem_seq
*
100
;
...
...
src/backend/utils/misc/guc.c
浏览文件 @
76920de8
...
...
@@ -4,7 +4,7 @@
* Support for grand unified configuration scheme, including SET
* command, configuration file, and command line options.
*
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.2
0 2000/11/14 19:13:27
petere Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.2
1 2000/11/15 18:36:05
petere Exp $
*
* Copyright 2000 by PostgreSQL Global Development Group
* Written by Peter Eisentraut <peter_e@gmx.net>.
...
...
@@ -319,7 +319,7 @@ ConfigureNamesString[] =
{
"unixsocket"
,
PGC_POSTMASTER
,
&
UnixSocketName
,
""
,
NULL
},
{
"
hostname"
,
PGC_POSTMASTER
,
&
HostName
,
{
"
virtual_host"
,
PGC_POSTMASTER
,
&
Virtual_host
,
""
,
NULL
},
{
NULL
,
0
,
NULL
,
NULL
,
NULL
}
...
...
src/include/libpq/pqcomm.h
浏览文件 @
76920de8
...
...
@@ -9,7 +9,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: pqcomm.h,v 1.4
4 2000/11/13 15:18:14 momjian
Exp $
* $Id: pqcomm.h,v 1.4
5 2000/11/15 18:36:06 petere
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -180,6 +180,6 @@ extern int Unix_socket_permissions;
extern
char
*
Unix_socket_group
;
extern
char
*
UnixSocketName
;
extern
char
*
HostName
;
extern
char
*
Virtual_host
;
#endif
/* PQCOMM_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录