Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
4098c886
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,发现更多精彩内容 >>
提交
4098c886
编写于
7月 23, 2005
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Macro alignment cleanup.
上级
f76f24df
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
26 addition
and
17 deletion
+26
-17
src/backend/access/transam/xlog.c
src/backend/access/transam/xlog.c
+26
-17
未找到文件。
src/backend/access/transam/xlog.c
浏览文件 @
4098c886
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.20
8 2005/07/08 04:07:26 tgl
Exp $
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.20
9 2005/07/23 15:29:47 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -47,6 +47,15 @@
#include "utils/relcache.h"
/*
* Becauase O_DIRECT bypasses the kernel buffers, and because we never
* read those buffers except during crash recovery, it seems like
* a win to use it in all cases.
*/
#ifdef O_DIRECT
#define PG_O_DIRECT O_DIR(enableFsync ? (open_sync_bit | O_DIRECT) : 0)
#else
/*
* This chunk of hackery attempts to determine which file sync methods
* are available on the current platform, and to choose an appropriate
...
...
@@ -54,40 +63,40 @@
* configure determined whether fdatasync() is.
*/
#if defined(O_SYNC)
#define OPEN_SYNC_FLAG
O_SYNC
#define OPEN_SYNC_FLAG
O_SYNC
#else
#if defined(O_FSYNC)
#define OPEN_SYNC_FLAG
O_FSYNC
#define OPEN_SYNC_FLAG
O_FSYNC
#endif
#endif
#if defined(O_DSYNC)
#if defined(OPEN_SYNC_FLAG)
#if O_DSYNC != OPEN_SYNC_FLAG
#define OPEN_DATASYNC_FLAG
O_DSYNC
#define OPEN_DATASYNC_FLAG
O_DSYNC
#endif
#else
/* !defined(OPEN_SYNC_FLAG) */
/* Win32 only has O_DSYNC */
#define OPEN_DATASYNC_FLAG
O_DSYNC
#define OPEN_DATASYNC_FLAG
O_DSYNC
#endif
#endif
#if defined(OPEN_DATASYNC_FLAG)
#define DEFAULT_SYNC_METHOD_STR
"open_datasync"
#define DEFAULT_SYNC_METHOD
SYNC_METHOD_OPEN
#define DEFAULT_SYNC_FLAGBIT
OPEN_DATASYNC_FLAG
#define DEFAULT_SYNC_METHOD_STR
"open_datasync"
#define DEFAULT_SYNC_METHOD SYNC_METHOD_OPEN
#define DEFAULT_SYNC_FLAGBIT OPEN_DATASYNC_FLAG
#elif defined(HAVE_FDATASYNC)
#define DEFAULT_SYNC_METHOD_STR
"fdatasync"
#define DEFAULT_SYNC_METHOD
SYNC_METHOD_FDATASYNC
#define DEFAULT_SYNC_FLAGBIT
0
#define DEFAULT_SYNC_METHOD_STR "fdatasync"
#define DEFAULT_SYNC_METHOD SYNC_METHOD_FDATASYNC
#define DEFAULT_SYNC_FLAGBIT 0
#elif !defined(HAVE_FSYNC_WRITETHROUGH_ONLY)
#define DEFAULT_SYNC_METHOD_STR
"fsync"
#define DEFAULT_SYNC_METHOD
SYNC_METHOD_FSYNC
#define DEFAULT_SYNC_FLAGBIT
0
#define DEFAULT_SYNC_METHOD_STR "fsync"
#define DEFAULT_SYNC_METHOD SYNC_METHOD_FSYNC
#define DEFAULT_SYNC_FLAGBIT 0
#else
#define DEFAULT_SYNC_METHOD_STR
"fsync_writethrough"
#define DEFAULT_SYNC_METHOD
SYNC_METHOD_FSYNC_WRITETHROUGH
#define DEFAULT_SYNC_FLAGBIT
0
#define DEFAULT_SYNC_METHOD_STR "fsync_writethrough"
#define DEFAULT_SYNC_METHOD SYNC_METHOD_FSYNC_WRITETHROUGH
#define DEFAULT_SYNC_FLAGBIT 0
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录