Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fgXRG-0005FH-10 for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Jul 2018 15:35:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fgXRC-0008ND-3F for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Jul 2018 15:35:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fgXRB-0008Mw-Rc for pgsql-hackers@lists.postgresql.org; Fri, 20 Jul 2018 15:35:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fgXR4-0000TU-EJ for pgsql-hackers@postgresql.org; Fri, 20 Jul 2018 15:35:20 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w6KFYvnm029876; Fri, 20 Jul 2018 11:34:57 -0400 From: Tom Lane To: Heikki Linnakangas cc: Thomas Munro , Pg Hackers , Oskari Saarenmaa , Tobias Oberstein Subject: Re: pread() and pwrite() In-reply-to: <6cc7c8dd-29f9-7d75-d18a-99f19c076d10@iki.fi> References: <6cc7c8dd-29f9-7d75-d18a-99f19c076d10@iki.fi> Comments: In-reply-to Heikki Linnakangas message dated "Fri, 20 Jul 2018 10:56:51 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <29874.1532100897.1@sss.pgh.pa.us> Date: Fri, 20 Jul 2018 11:34:57 -0400 Message-ID: <29875.1532100897@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Heikki Linnakangas writes: > No objections, if you want to make the effort. But IMHO the lseek+read > fallback is good enough on Windows. Unless you were thinking that we > could then remove the !HAVE_PREAD fallback altogether. Are there any > other platforms out there that don't have pread/pwrite that we care about? AFAICT, macOS has them as far back as we care about (prairiedog does). HPUX 10.20 (gaur/pademelon) does not, so personally I'd like to keep the lseek+read workaround. Don't know about the oldest Solaris critters we have in the buildfarm. FreeBSD has had 'em at least since 4.0 (1994); didn't check the other BSDen. SUS v2 (POSIX 1997) does specify both functions, so we could insist on their presence without breaking any of our own portability guidelines. However, if we have to have some workaround anyway for Windows, it seems like including an lseek+read code path is reasonable so that we needn't retire those oldest buildfarm critters. regards, tom lane