Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c6b1724

Browse files
committed
Update O_DIRECT comment.
1 parent 5b63e7b commit c6b1724

File tree

1 file changed

+3
-1
lines changed
  • src/backend/access/transam

1 file changed

+3
-1
lines changed

src/backend/access/transam/xlog.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.211 2005/07/29 03:22:33 momjian Exp $
10+
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.212 2005/07/29 03:25:53 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -54,6 +54,8 @@
5454
* with fsync(), but because skipping the kernel buffer forces writes out
5555
* quickly, it seems best just to use it for O_SYNC. It is hard to imagine
5656
* how fsync() could be a win for O_DIRECT compared to O_SYNC and O_DIRECT.
57+
* Also, O_DIRECT is never enough to force data to the drives, it merely
58+
* tries to bypass the kernel cache, so we still need O_SYNC or fsync().
5759
*/
5860
#ifdef O_DIRECT
5961
#define PG_O_DIRECT O_DIRECT

0 commit comments

Comments
 (0)