From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use pg_pread() and pg_pwrite() for data files and WAL.
Date: Tue, 06 Nov 2018 21:01:53 +0000
Message-ID: <E1gK8Tx-0001q3-3X@gemulon.postgresql.org> (raw)
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/c24dcd0cfd949bdf245814c4c2b3df828ee7db36
Modified Files
--------------
src/backend/access/heap/rewriteheap.c | 2 +-
src/backend/access/transam/xlog.c | 30 +----
src/backend/storage/file/buffile.c | 46 +-------
src/backend/storage/file/fd.c | 205 +++++-----------------------------
src/backend/storage/smgr/md.c | 35 +-----
src/include/storage/fd.h | 12 +-
6 files changed, 42 insertions(+), 288 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tmunro@postgresql.org
Subject: Re: pgsql: Use pg_pread() and pg_pwrite() for data files and WAL.
In-Reply-To: <E1gK8Tx-0001q3-3X@gemulon.postgresql.org>
References: <E1gK8Tx-0001q3-3X@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox