Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
593c39d1
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,发现更多精彩内容 >>
提交
593c39d1
编写于
3月 28, 2013
作者:
S
Simon Riggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revoke
bc5334d8
上级
d139a5e2
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
7 addition
and
74 deletion
+7
-74
doc/src/sgml/config.sgml
doc/src/sgml/config.sgml
+0
-16
src/backend/access/transam/xlog.c
src/backend/access/transam/xlog.c
+7
-11
src/backend/utils/init/globals.c
src/backend/utils/init/globals.c
+0
-1
src/backend/utils/init/miscinit.c
src/backend/utils/init/miscinit.c
+0
-19
src/backend/utils/misc/guc.c
src/backend/utils/misc/guc.c
+0
-24
src/include/miscadmin.h
src/include/miscadmin.h
+0
-2
src/include/utils/guc.h
src/include/utils/guc.h
+0
-1
未找到文件。
doc/src/sgml/config.sgml
浏览文件 @
593c39d1
...
...
@@ -330,22 +330,6 @@ include 'filename'
</listitem>
</varlistentry>
<varlistentry id="guc-recovery-config-directory" xreflabel="recovery_config_directory">
<term><varname>recovery_config_directory</varname> (<type>string</type>)</term>
<indexterm>
<primary><varname>recovery_config_directory</> configuration parameter</primary>
</indexterm>
<listitem>
<para>
Specifies the directory to use for the recovery.conf file. Note
the server requires read and write permission on this directory
because the file will be renamed to recovery.done at the end of
recovery.
This parameter can only be set at server start.
</para>
</listitem>
</varlistentry>
<varlistentry id="guc-config-file" xreflabel="config_file">
<term><varname>config_file</varname> (<type>string</type>)</term>
<indexterm>
...
...
src/backend/access/transam/xlog.c
浏览文件 @
593c39d1
...
...
@@ -62,7 +62,6 @@
extern
bool
bootstrap_data_checksums
;
char
recoveryConfPath
[
MAXPGPATH
];
/* File path names (all relative to $PGDATA) */
#define RECOVERY_COMMAND_FILE "recovery.conf"
#define RECOVERY_COMMAND_DONE "recovery.done"
...
...
@@ -4164,8 +4163,7 @@ readRecoveryCommandFile(void)
*
head
=
NULL
,
*
tail
=
NULL
;
snprintf
(
recoveryConfPath
,
MAXPGPATH
,
"%s/%s"
,
RecoveryConfDir
,
RECOVERY_COMMAND_FILE
);
fd
=
AllocateFile
(
recoveryConfPath
,
"r"
);
fd
=
AllocateFile
(
RECOVERY_COMMAND_FILE
,
"r"
);
if
(
fd
==
NULL
)
{
if
(
errno
==
ENOENT
)
...
...
@@ -4173,7 +4171,7 @@ readRecoveryCommandFile(void)
ereport
(
FATAL
,
(
errcode_for_file_access
(),
errmsg
(
"could not open recovery command file
\"
%s
\"
: %m"
,
recoveryConfPath
)));
RECOVERY_COMMAND_FILE
)));
}
/*
...
...
@@ -4347,7 +4345,7 @@ readRecoveryCommandFile(void)
if
(
PrimaryConnInfo
==
NULL
&&
recoveryRestoreCommand
==
NULL
)
ereport
(
WARNING
,
(
errmsg
(
"recovery command file
\"
%s
\"
specified neither primary_conninfo nor restore_command"
,
recoveryConfPath
),
RECOVERY_COMMAND_FILE
),
errhint
(
"The database server will regularly poll the pg_xlog subdirectory to check for files placed there."
)));
}
else
...
...
@@ -4355,7 +4353,7 @@ readRecoveryCommandFile(void)
if
(
recoveryRestoreCommand
==
NULL
)
ereport
(
FATAL
,
(
errmsg
(
"recovery command file
\"
%s
\"
must specify restore_command when standby mode is not enabled"
,
recoveryConfPath
)));
RECOVERY_COMMAND_FILE
)));
}
/* Enable fetching from archive recovery area */
...
...
@@ -4397,7 +4395,6 @@ static void
exitArchiveRecovery
(
TimeLineID
endTLI
,
XLogSegNo
endLogSegNo
)
{
char
recoveryPath
[
MAXPGPATH
];
char
recoveryDonePath
[
MAXPGPATH
];
char
xlogpath
[
MAXPGPATH
];
/*
...
...
@@ -4462,13 +4459,12 @@ exitArchiveRecovery(TimeLineID endTLI, XLogSegNo endLogSegNo)
* Rename the config file out of the way, so that we don't accidentally
* re-enter archive recovery mode in a subsequent crash.
*/
snprintf
(
recoveryDonePath
,
MAXPGPATH
,
"%s/%s"
,
RecoveryConfDir
,
RECOVERY_COMMAND_DONE
);
unlink
(
recoveryDonePath
);
if
(
rename
(
recoveryConfPath
,
recoveryDonePath
)
!=
0
)
unlink
(
RECOVERY_COMMAND_DONE
);
if
(
rename
(
RECOVERY_COMMAND_FILE
,
RECOVERY_COMMAND_DONE
)
!=
0
)
ereport
(
FATAL
,
(
errcode_for_file_access
(),
errmsg
(
"could not rename file
\"
%s
\"
to
\"
%s
\"
: %m"
,
recoveryConfPath
,
recoveryDonePath
)));
RECOVERY_COMMAND_FILE
,
RECOVERY_COMMAND_DONE
)));
ereport
(
LOG
,
(
errmsg
(
"archive recovery complete"
)));
...
...
src/backend/utils/init/globals.c
浏览文件 @
593c39d1
...
...
@@ -46,7 +46,6 @@ int MyPMChildSlot;
* explicitly.
*/
char
*
DataDir
=
NULL
;
char
*
RecoveryConfDir
=
NULL
;
char
OutputFileName
[
MAXPGPATH
];
/* debugging output file */
...
...
src/backend/utils/init/miscinit.c
浏览文件 @
593c39d1
...
...
@@ -99,25 +99,6 @@ SetDataDir(const char *dir)
DataDir
=
new
;
}
/*
* Set recovery config directory, but make sure it's an absolute path. Use this,
* never set RecoveryConfDir directly.
*/
void
SetRecoveryConfDir
(
const
char
*
dir
)
{
char
*
new
;
AssertArg
(
dir
);
/* If presented path is relative, convert to absolute */
new
=
make_absolute_path
(
dir
);
if
(
RecoveryConfDir
)
free
(
RecoveryConfDir
);
RecoveryConfDir
=
new
;
}
/*
* Change working directory to DataDir. Most of the postmaster and backend
* code assumes that we are in DataDir so it can use relative paths to access
...
...
src/backend/utils/misc/guc.c
浏览文件 @
593c39d1
...
...
@@ -424,7 +424,6 @@ int temp_file_limit = -1;
int
num_temp_buffers
=
1024
;
char
*
data_directory
;
char
*
recovery_config_directory
;
char
*
ConfigFileName
;
char
*
HbaFileName
;
char
*
IdentFileName
;
...
...
@@ -2961,17 +2960,6 @@ static struct config_string ConfigureNamesString[] =
NULL
,
NULL
,
NULL
},
{
{
"recovery_config_directory"
,
PGC_POSTMASTER
,
FILE_LOCATIONS
,
gettext_noop
(
"Sets the server's recovery configuration directory."
),
NULL
,
GUC_SUPERUSER_ONLY
},
&
recovery_config_directory
,
NULL
,
NULL
,
NULL
,
NULL
},
{
{
"config_file"
,
PGC_POSTMASTER
,
FILE_LOCATIONS
,
gettext_noop
(
"Sets the server's main configuration file."
),
...
...
@@ -4193,18 +4181,6 @@ SelectConfigFiles(const char *userDoption, const char *progname)
*/
SetConfigOption
(
"data_directory"
,
DataDir
,
PGC_POSTMASTER
,
PGC_S_OVERRIDE
);
/*
* If the recovery_config_directory GUC variable has been set, use that,
* otherwise use DataDir.
*
* Note: SetRecoveryConfDir will copy and absolute-ize its argument,
* so we don't have to.
*/
if
(
recovery_config_directory
)
SetRecoveryConfDir
(
recovery_config_directory
);
else
SetRecoveryConfDir
(
DataDir
);
/*
* If timezone_abbreviations wasn't set in the configuration file, install
* the default value. We do it this way because we can't safely install a
...
...
src/include/miscadmin.h
浏览文件 @
593c39d1
...
...
@@ -137,7 +137,6 @@ extern bool IsBinaryUpgrade;
extern
bool
ExitOnAnyError
;
extern
PGDLLIMPORT
char
*
DataDir
;
extern
PGDLLIMPORT
char
*
RecoveryConfDir
;
extern
PGDLLIMPORT
int
NBuffers
;
extern
int
MaxBackends
;
...
...
@@ -302,7 +301,6 @@ extern Oid GetCurrentRoleId(void);
extern
void
SetCurrentRoleId
(
Oid
roleid
,
bool
is_superuser
);
extern
void
SetDataDir
(
const
char
*
dir
);
extern
void
SetRecoveryConfDir
(
const
char
*
dir
);
extern
void
ChangeToDataDir
(
void
);
extern
char
*
make_absolute_path
(
const
char
*
path
);
...
...
src/include/utils/guc.h
浏览文件 @
593c39d1
...
...
@@ -220,7 +220,6 @@ extern int temp_file_limit;
extern
int
num_temp_buffers
;
extern
char
*
data_directory
;
extern
char
*
recovery_config_directory
;
extern
char
*
ConfigFileName
;
extern
char
*
HbaFileName
;
extern
char
*
IdentFileName
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录