From: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
To: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Use pg_pread() and pg_pwrite() for data files and WAL.
Date: Tue, 6 Nov 2018 17:32:21 -0500
Message-ID: <2d52ff4a-5440-f6f1-7806-423b0e6370cb@2ndQuadrant.com> (raw)
In-Reply-To: <E1gK8Tx-0001q3-3X@gemulon.postgresql.org>
References: <E1gK8Tx-0001q3-3X@gemulon.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
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: andrew.dunstan@2ndquadrant.com, tmunro@postgresql.org
Subject: Re: pgsql: Use pg_pread() and pg_pwrite() for data files and WAL.
In-Reply-To: <2d52ff4a-5440-f6f1-7806-423b0e6370cb@2ndQuadrant.com>
References: <E1gK8Tx-0001q3-3X@gemulon.postgresql.org> <2d52ff4a-5440-f6f1-7806-423b0e6370cb@2ndQuadrant.com>
* 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