summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/heap/rewriteheap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/access/heap/rewriteheap.c b/src/backend/access/heap/rewriteheap.c
index aca3a96d7e5..f208b5c4aa9 100644
--- a/src/backend/access/heap/rewriteheap.c
+++ b/src/backend/access/heap/rewriteheap.c
@@ -1279,7 +1279,8 @@ CheckPointLogicalRewriteHeap(void)
}
else
{
- int fd = OpenTransientFile(path, O_RDONLY | PG_BINARY, 0);
+ /* on some operating systems fsyncing a file requires O_RDWR */
+ int fd = OpenTransientFile(path, O_RDWR | PG_BINARY, 0);
/*
* The file cannot vanish due to concurrency since this function