pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Victor Wagner <vitus@wagner.pp.ru>
To: pgsql-hackers@postgresql.org
Subject: Re: Use pread and pwrite instead of lseek + write and read
Date: Wed, 17 Aug 2016 12:34:37 +0300
Message-ID: <20160817123437.44f3f60a@fafnir.local.vm> (raw)
In-Reply-To: <a86bd200-ebbe-d829-e3ca-0c4474b2fcb7@ohmu.fi>
References: <a86bd200-ebbe-d829-e3ca-0c4474b2fcb7@ohmu.fi>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On Wed, 17 Aug 2016 10:58:09 +0300
Oskari Saarenmaa <os@ohmu.fi> wrote:



> 
> The attached patch replaces FileWrite and FileRead with FileWriteAt
> and FileReadAt and removes most FileSeek calls.  FileSeek is still
> around so we can find the end of a file, but it's not used for
> anything else.

It seems that configure test for availability of pread/pwrite functions
and corresponding #define is needed.
 
I don't think that all platforms, supported by PostgreSQL support this
API. Especially, I cannot find any mention of pread/pwrite in the Win32 
except this thread on stackoverflow:


http://stackoverflow.com/questions/766477/are-there-equivalents-to-pread-on-different-platforms



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (15+ messages)  latest in thread

Message-ID: <20160817123437.44f3f60a@fafnir.local.vm>
Permalink:  ../20160817123437.44f3f60a@fafnir.local.vm/
Also on:    postgresql.org/message-id/20160817123437.44f3f60a@fafnir.local.vm

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: vitus@wagner.pp.ru
  Subject: Re: Use pread and pwrite instead of lseek + write and read
  In-Reply-To: <20160817123437.44f3f60a@fafnir.local.vm>

* 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