Re: pread() and pwrite()
Thomas Munro <thomas.munro@enterprisedb.com>
From: Thomas Munro <thomas.munro@enterprisedb.com>
To: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Cc: Jesper Pedersen <jesper.pedersen@redhat.com>,
Tom Lane <tgl@sss.pgh.pa.us>, Alvaro Herrera <alvherre@2ndquadrant.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-07T22:48:52Z
Lists: pgsql-hackers
On Thu, Nov 8, 2018 at 4:27 AM Andrew Dunstan <andrew.dunstan@2ndquadrant.com> wrote: > On 11/7/18 10:05 AM, Jesper Pedersen wrote: > > On 11/7/18 9:30 AM, Tom Lane wrote: > >> I'm confused by this. Surely the pwrite-based code is writing > >> exactly the > >> same data as before. Do we have to conclude that valgrind is > >> complaining > >> about passing uninitialized data to pwrite() when it did not complain > >> about exactly the same thing for write()? > >> > >> [ looks ... ] No, what we have to conclude is that the write-related > >> suppressions in src/tools/valgrind.supp need to be replaced or augmented > >> with pwrite-related ones. > > > > The attached patch fixes this for me. > > > > Unfortunately pwrite* doesn't work for the pwrite64(buf) line. > > Works for me. If there's no objection I will commit this. Thanks for adjusting that. I suppose I would have known about this if cfbot checked every patch with valgrind, which I might look into. I'm a little confused about how an uninitialised value originating in an OID list finishes up in an xlog buffer, considering that OIDs don't have padding. -- Thomas Munro http://www.enterprisedb.com
Commits
-
Use pg_pread() and pg_pwrite() for data files and WAL.
- c24dcd0cfd94 12.0 landed
-
Provide pg_pread() and pg_pwrite() for random I/O.
- 3fd2a7932ef0 12.0 landed
-
Convert some long lists in configure.in to one-line-per-entry style.
- bfa6c5a0c974 12.0 landed