Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
8a2f5d22
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,发现更多精彩内容 >>
提交
8a2f5d22
编写于
5月 16, 2008
作者:
T
Tom Lane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Reduce unnecessary PANIC to ERROR, improve a couple of comments.
上级
e7b498bd
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
15 deletion
+11
-15
src/backend/access/transam/xlog.c
src/backend/access/transam/xlog.c
+11
-15
未找到文件。
src/backend/access/transam/xlog.c
浏览文件 @
8a2f5d22
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.3
09 2008/05/14 14:02:57 mha
Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.3
10 2008/05/16 19:15:05 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -67,6 +67,7 @@ bool XLogArchiveMode = false;
char
*
XLogArchiveCommand
=
NULL
;
bool
fullPageWrites
=
true
;
bool
log_checkpoints
=
false
;
int
sync_method
=
DEFAULT_SYNC_METHOD
;
#ifdef WAL_DEBUG
bool
XLOG_DEBUG
=
false
;
...
...
@@ -88,8 +89,6 @@ bool XLOG_DEBUG = false;
/*
* GUC support
*/
int
sync_method
=
DEFAULT_SYNC_METHOD
;
const
struct
config_enum_entry
sync_method_options
[]
=
{
{
"fsync"
,
SYNC_METHOD_FSYNC
},
#ifdef HAVE_FSYNC_WRITETHROUGH
...
...
@@ -1613,7 +1612,8 @@ XLogWrite(XLogwrtRqst WriteRqst, bool flexible, bool xlog_switch)
* have no open file or the wrong one. However, we do not need to
* fsync more than one file.
*/
if
(
sync_method
!=
SYNC_METHOD_OPEN
&&
sync_method
!=
SYNC_METHOD_OPEN_DSYNC
)
if
(
sync_method
!=
SYNC_METHOD_OPEN
&&
sync_method
!=
SYNC_METHOD_OPEN_DSYNC
)
{
if
(
openLogFile
>=
0
&&
!
XLByteInPrevSeg
(
LogwrtResult
.
Write
,
openLogId
,
openLogSeg
))
...
...
@@ -6340,10 +6340,10 @@ get_sync_bit(int method)
switch
(
method
)
{
/*
*
Values for these
sync options are defined even if they are not
* supported on the current platform.
They are not included in
*
the enum option array, and therefor will never be set if the
*
platform doesn't support it
.
*
enum values for all
sync options are defined even if they are not
* supported on the current platform.
But if not, they are not
*
included in the enum option array, and therefore will never be seen
*
here
.
*/
case
SYNC_METHOD_FSYNC
:
case
SYNC_METHOD_FSYNC_WRITETHROUGH
:
...
...
@@ -6358,12 +6358,8 @@ get_sync_bit(int method)
return
OPEN_DATASYNC_FLAG
;
#endif
default:
/*
* This "can never happen", since the available values in
* new_sync_method are controlled by the available enum
* options.
*/
elog
(
PANIC
,
"unrecognized wal_sync_method: %d"
,
method
);
/* can't happen (unless we are out of sync with option array) */
elog
(
ERROR
,
"unrecognized wal_sync_method: %d"
,
method
);
return
0
;
/* silence warning */
}
}
...
...
@@ -6392,7 +6388,7 @@ assign_xlog_sync_method(int new_sync_method, bool doit, GucSource source)
(
errcode_for_file_access
(),
errmsg
(
"could not fsync log file %u, segment %u: %m"
,
openLogId
,
openLogSeg
)));
if
(
get_sync_bit
(
sync_method
)
!=
get_sync_bit
(
new_sync_method
))
if
(
get_sync_bit
(
sync_method
)
!=
get_sync_bit
(
new_sync_method
))
XLogFileClose
();
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录