pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Use pg_pread() and pg_pwrite() for data files and WAL.
3+ messages / 3 participants
[nested] [flat]
Commits from this thread:
2018-11-06 c4f0876fb8 Remove set-but-unused variable.
* pgsql: Use pg_pread() and pg_pwrite() for data files and WAL.
@ 2018-11-06 21:01 Thomas Munro <tmunro@postgresql.org>
2018-11-06 22:32 ` Re: pgsql: Use pg_pread() and pg_pwrite() for data files and WAL. Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Munro @ 2018-11-06 21:01 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
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(-)
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Use pg_pread() and pg_pwrite() for data files and WAL.
2018-11-06 21:01 pgsql: Use pg_pread() and pg_pwrite() for data files and WAL. Thomas Munro <tmunro@postgresql.org>
@ 2018-11-06 22:32 ` Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
2018-11-06 22:43 ` Re: pgsql: Use pg_pread() and pg_pwrite() for data files and WAL. Thomas Munro <thomas.munro@enterprisedb.com>
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Dunstan @ 2018-11-06 22:32 UTC (permalink / raw)
To: Thomas Munro <tmunro@postgresql.org>; pgsql-committers@lists.postgresql.org
On 11/6/18 4:01 PM, Thomas Munro wrote:
> 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.
Getting this warning (gcc 8.2.1 Fedora 29):
Nov 06 17:18:55
/home/bf/bfr/root/HEAD/pgsql.build/../pgsql/src/backend/storage/file/fd.c:
In function ‘FileSize’:
Nov 06 17:18:55
/home/bf/bfr/root/HEAD/pgsql.build/../pgsql/src/backend/storage/file/fd.c:2007:11:
warning: variable ‘vfdP’ set but not used [-Wunused-but-set-variable]
Nov 06 17:18:55 Vfd *vfdP;
Nov 06 17:18:55 ^~~~
cheers
andrew
--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Use pg_pread() and pg_pwrite() for data files and WAL.
2018-11-06 21:01 pgsql: Use pg_pread() and pg_pwrite() for data files and WAL. Thomas Munro <tmunro@postgresql.org>
2018-11-06 22:32 ` Re: pgsql: Use pg_pread() and pg_pwrite() for data files and WAL. Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
@ 2018-11-06 22:43 ` Thomas Munro <thomas.munro@enterprisedb.com>
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Munro @ 2018-11-06 22:43 UTC (permalink / raw)
To: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>; +Cc: Thomas Munro <tmunro@postgresql.org>; pgsql-committers@lists.postgresql.org
On Wed, Nov 7, 2018 at 11:32 AM Andrew Dunstan
<andrew.dunstan@2ndquadrant.com> wrote:
> On 11/6/18 4:01 PM, Thomas Munro wrote:
> > 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.
>
> Getting this warning (gcc 8.2.1 Fedora 29):
>
> Nov 06 17:18:55
> /home/bf/bfr/root/HEAD/pgsql.build/../pgsql/src/backend/storage/file/fd.c:
> In function ‘FileSize’:
> Nov 06 17:18:55
> /home/bf/bfr/root/HEAD/pgsql.build/../pgsql/src/backend/storage/file/fd.c:2007:11:
> warning: variable ‘vfdP’ set but not used [-Wunused-but-set-variable]
> Nov 06 17:18:55 Vfd *vfdP;
> Nov 06 17:18:55 ^~~~
Thanks, will fix.
--
Thomas Munro
http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2018-11-06 22:43 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-11-06 21:01 pgsql: Use pg_pread() and pg_pwrite() for data files and WAL. Thomas Munro <tmunro@postgresql.org>
2018-11-06 22:32 ` Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
2018-11-06 22:43 ` Thomas Munro <thomas.munro@enterprisedb.com>
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