Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZxFi-0002P2-PR for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Aug 2016 09:35:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bZxFi-0002wN-2a for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Aug 2016 09:35:14 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bZxFh-0002tN-FY for pgsql-hackers@postgresql.org; Wed, 17 Aug 2016 09:35:13 +0000 Received: from mx.wagner.pp.ru ([78.46.190.96]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZxFP-0008Bu-Ek for pgsql-hackers@postgresql.org; Wed, 17 Aug 2016 09:34:59 +0000 Received: from mail.wagner.pp.ru (unknown [192.168.217.131]) by mx.wagner.pp.ru (Postfix) with ESMTP id 5A5ABE0959 for ; Wed, 17 Aug 2016 12:34:39 +0300 (MSK) Received: from fafnir.local.vm (newmail.postgrespro.ru [93.174.131.138]) by mail.wagner.pp.ru (Postfix) with ESMTPSA id AE30020B47 for ; Wed, 17 Aug 2016 12:34:38 +0300 (MSK) Date: Wed, 17 Aug 2016 12:34:37 +0300 From: Victor Wagner To: pgsql-hackers@postgresql.org Subject: Re: Use pread and pwrite instead of lseek + write and read Message-ID: <20160817123437.44f3f60a@fafnir.local.vm> In-Reply-To: References: X-Mailer: Claws Mail 3.13.0 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On Wed, 17 Aug 2016 10:58:09 +0300 Oskari Saarenmaa 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