Re: pread() and pwrite()

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, Jesper Pedersen <jesper.pedersen@redhat.com>, Magnus Hagander <magnus@hagander.net>, Oskari Saarenmaa <os@ohmu.fi>, Pg Hackers <pgsql-hackers@postgresql.org>, Tobias Oberstein <tobias.oberstein@gmail.com>
Date: 2018-11-06T15:32:02Z
Lists: pgsql-hackers
Thomas Munro <thomas.munro@enterprisedb.com> writes:
> On Tue, Nov 6, 2018 at 6:23 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> What I suggest is that we *not* try to make this a completely transparent
>> substitute.  Instead, make the functions exported by src/port/ be
>> "pg_pread" and "pg_pwrite", ...

> OK.  But since we're using this from both fd.c and xlog.c, I put that
> into src/include/port.h.

LGTM.  I didn't bother to run an actual test cycle, since it's not
materially different from the previous version as far as portability
is concerned.

			regards, tom lane


Commits

  1. Use pg_pread() and pg_pwrite() for data files and WAL.

  2. Provide pg_pread() and pg_pwrite() for random I/O.

  3. Convert some long lists in configure.in to one-line-per-entry style.