Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
afbc30e5
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,发现更多精彩内容 >>
提交
afbc30e5
编写于
2月 27, 2005
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Allow Win32 to support the O_SYNC open flag as an wal_sync_method method.
Magnus Hagander
上级
234d5081
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
6 deletion
+17
-6
src/include/port.h
src/include/port.h
+3
-2
src/include/port/win32.h
src/include/port/win32.h
+9
-1
src/port/open.c
src/port/open.c
+5
-3
未找到文件。
src/include/port.h
浏览文件 @
afbc30e5
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/port.h,v 1.
69 2005/01/06 00:59:25 tgl
Exp $
* $PostgreSQL: pgsql/src/include/port.h,v 1.
70 2005/02/27 00:53:29 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -174,7 +174,8 @@ extern bool rmtree(char *path, bool rmtopdir);
#if defined(WIN32) && !defined(__CYGWIN__)
/* open() replacement to allow delete of held files */
/* open() replacement to allow delete of held files and passing
* of special options. */
#ifndef WIN32_CLIENT_ONLY
extern
int
win32_open
(
const
char
*
,
int
,...);
...
...
src/include/port/win32.h
浏览文件 @
afbc30e5
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.4
2 2004/12/26 19:20:33 tgl
Exp $ */
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.4
3 2005/02/27 00:53:29 momjian
Exp $ */
/* undefine and redefine after #include */
#undef mkdir
...
...
@@ -183,6 +183,14 @@ typedef int pid_t;
*/
#define lstat(path, sb) stat((path), (sb))
/*
* Supplement to <fcntl.h>.
* This is the same value as _O_NOINHERIT in the MS header file. This is
* to ensure that we don't collide with a future definition. It means
* we cannot use _O_NOINHERIT ourselves.
*/
#define O_SYNC 0x0080
/*
* Supplement to <errno.h>.
*/
...
...
src/port/open.c
浏览文件 @
afbc30e5
...
...
@@ -6,13 +6,14 @@
*
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/port/open.c,v 1.
7 2004/12/31 22:03:53 pgsql
Exp $
* $PostgreSQL: pgsql/src/port/open.c,v 1.
8 2005/02/27 00:53:29 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
#ifdef WIN32
#include <postgres.h>
#include <windows.h>
#include <fcntl.h>
#include <errno.h>
...
...
@@ -62,7 +63,7 @@ win32_open(const char *fileName, int fileFlags,...)
/* Check that we can handle the request */
assert
((
fileFlags
&
((
O_RDONLY
|
O_WRONLY
|
O_RDWR
)
|
O_APPEND
|
(
O_RANDOM
|
O_SEQUENTIAL
|
O_TEMPORARY
)
|
_O_SHORT_LIVED
|
_O_SHORT_LIVED
|
O_SYNC
|
(
O_CREAT
|
O_TRUNC
|
O_EXCL
)
|
(
O_TEXT
|
O_BINARY
)))
==
fileFlags
);
sa
.
nLength
=
sizeof
(
sa
);
...
...
@@ -81,7 +82,8 @@ win32_open(const char *fileName, int fileFlags,...)
((
fileFlags
&
O_RANDOM
)
?
FILE_FLAG_RANDOM_ACCESS
:
0
)
|
((
fileFlags
&
O_SEQUENTIAL
)
?
FILE_FLAG_SEQUENTIAL_SCAN
:
0
)
|
((
fileFlags
&
_O_SHORT_LIVED
)
?
FILE_ATTRIBUTE_TEMPORARY
:
0
)
|
((
fileFlags
&
O_TEMPORARY
)
?
FILE_FLAG_DELETE_ON_CLOSE
:
0
),
((
fileFlags
&
O_TEMPORARY
)
?
FILE_FLAG_DELETE_ON_CLOSE
:
0
)
|
((
fileFlags
&
O_SYNC
)
?
FILE_FLAG_WRITE_THROUGH
:
0
),
NULL
))
==
INVALID_HANDLE_VALUE
)
{
switch
(
GetLastError
())
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录