Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
4098c886
Commit
4098c886
authored
Jul 23, 2005
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Macro alignment cleanup.
parent
f76f24df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
17 deletions
+26
-17
src/backend/access/transam/xlog.c
src/backend/access/transam/xlog.c
+26
-17
No files found.
src/backend/access/transam/xlog.c
View file @
4098c886
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* 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 @@
...
@@ -47,6 +47,15 @@
#include "utils/relcache.h"
#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
* This chunk of hackery attempts to determine which file sync methods
* are available on the current platform, and to choose an appropriate
* are available on the current platform, and to choose an appropriate
...
@@ -54,40 +63,40 @@
...
@@ -54,40 +63,40 @@
* configure determined whether fdatasync() is.
* configure determined whether fdatasync() is.
*/
*/
#if defined(O_SYNC)
#if defined(O_SYNC)
#define OPEN_SYNC_FLAG
O_SYNC
#define OPEN_SYNC_FLAG
O_SYNC
#else
#else
#if defined(O_FSYNC)
#if defined(O_FSYNC)
#define OPEN_SYNC_FLAG
O_FSYNC
#define OPEN_SYNC_FLAG
O_FSYNC
#endif
#endif
#endif
#endif
#if defined(O_DSYNC)
#if defined(O_DSYNC)
#if defined(OPEN_SYNC_FLAG)
#if defined(OPEN_SYNC_FLAG)
#if O_DSYNC != OPEN_SYNC_FLAG
#if O_DSYNC != OPEN_SYNC_FLAG
#define OPEN_DATASYNC_FLAG
O_DSYNC
#define OPEN_DATASYNC_FLAG
O_DSYNC
#endif
#endif
#else
/* !defined(OPEN_SYNC_FLAG) */
#else
/* !defined(OPEN_SYNC_FLAG) */
/* Win32 only has O_DSYNC */
/* Win32 only has O_DSYNC */
#define OPEN_DATASYNC_FLAG
O_DSYNC
#define OPEN_DATASYNC_FLAG
O_DSYNC
#endif
#endif
#endif
#endif
#if defined(OPEN_DATASYNC_FLAG)
#if defined(OPEN_DATASYNC_FLAG)
#define DEFAULT_SYNC_METHOD_STR
"open_datasync"
#define DEFAULT_SYNC_METHOD_STR
"open_datasync"
#define DEFAULT_SYNC_METHOD
SYNC_METHOD_OPEN
#define DEFAULT_SYNC_METHOD SYNC_METHOD_OPEN
#define DEFAULT_SYNC_FLAGBIT
OPEN_DATASYNC_FLAG
#define DEFAULT_SYNC_FLAGBIT OPEN_DATASYNC_FLAG
#elif defined(HAVE_FDATASYNC)
#elif defined(HAVE_FDATASYNC)
#define DEFAULT_SYNC_METHOD_STR
"fdatasync"
#define DEFAULT_SYNC_METHOD_STR "fdatasync"
#define DEFAULT_SYNC_METHOD
SYNC_METHOD_FDATASYNC
#define DEFAULT_SYNC_METHOD SYNC_METHOD_FDATASYNC
#define DEFAULT_SYNC_FLAGBIT
0
#define DEFAULT_SYNC_FLAGBIT 0
#elif !defined(HAVE_FSYNC_WRITETHROUGH_ONLY)
#elif !defined(HAVE_FSYNC_WRITETHROUGH_ONLY)
#define DEFAULT_SYNC_METHOD_STR
"fsync"
#define DEFAULT_SYNC_METHOD_STR "fsync"
#define DEFAULT_SYNC_METHOD
SYNC_METHOD_FSYNC
#define DEFAULT_SYNC_METHOD SYNC_METHOD_FSYNC
#define DEFAULT_SYNC_FLAGBIT
0
#define DEFAULT_SYNC_FLAGBIT 0
#else
#else
#define DEFAULT_SYNC_METHOD_STR
"fsync_writethrough"
#define DEFAULT_SYNC_METHOD_STR "fsync_writethrough"
#define DEFAULT_SYNC_METHOD
SYNC_METHOD_FSYNC_WRITETHROUGH
#define DEFAULT_SYNC_METHOD SYNC_METHOD_FSYNC_WRITETHROUGH
#define DEFAULT_SYNC_FLAGBIT
0
#define DEFAULT_SYNC_FLAGBIT 0
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment