diff options
author | Thomas Munro <tmunro@postgresql.org> | 2018-11-07 09:51:50 +1300 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2018-11-07 09:51:50 +1300 |
commit | c24dcd0cfd949bdf245814c4c2b3df828ee7db36 (patch) | |
tree | 7b361229b1a9bb895894dff9eaa8a593be9e20ce /src/backend/access/heap/rewriteheap.c | |
parent | 3fd2a7932ef0708dda57369bb20c0499d905cc82 (diff) | |
download | postgresql-c24dcd0cfd949bdf245814c4c2b3df828ee7db36.tar.gz postgresql-c24dcd0cfd949bdf245814c4c2b3df828ee7db36.zip |
Use pg_pread() and pg_pwrite() for data files and WAL.
Cut down on system calls by doing random I/O using offset-based OS
routines where available. Remove the code for tracking the 'virtual'
seek position. The only reason left to call FileSeek() was to get
the file's size, so provide a new function FileSize() instead.
Author: Oskari Saarenmaa, Thomas Munro
Reviewed-by: Thomas Munro, Jesper Pedersen, Tom Lane, Alvaro Herrera
Discussion: https://postgr.es/m/CAEepm=02rapCpPR3ZGF2vW=SBHSdFYO_bz_f-wwWJonmA3APgw@mail.gmail.com
Discussion: https://postgr.es/m/b8748d39-0b19-0514-a1b9-4e5a28e6a208%40gmail.com
Discussion: https://postgr.es/m/a86bd200-ebbe-d829-e3ca-0c4474b2fcb7%40ohmu.fi
Diffstat (limited to 'src/backend/access/heap/rewriteheap.c')
-rw-r--r-- | src/backend/access/heap/rewriteheap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/heap/rewriteheap.c b/src/backend/access/heap/rewriteheap.c index 71277889649..c5db75afa1f 100644 --- a/src/backend/access/heap/rewriteheap.c +++ b/src/backend/access/heap/rewriteheap.c @@ -935,7 +935,7 @@ logical_heap_rewrite_flush_mappings(RewriteState state) * Note that we deviate from the usual WAL coding practices here, * check the above "Logical rewrite support" comment for reasoning. */ - written = FileWrite(src->vfd, waldata_start, len, + written = FileWrite(src->vfd, waldata_start, len, src->off, WAIT_EVENT_LOGICAL_REWRITE_WRITE); if (written != len) ereport(ERROR, |