Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJfBN-0005E3-S0 for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Nov 2018 13:44:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gJfBM-0007XW-5Z for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Nov 2018 13:44:44 +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 1gJfBL-0007XO-Tl for pgsql-hackers@lists.postgresql.org; Mon, 05 Nov 2018 13:44:43 +0000 Received: from mail-qk1-f182.google.com ([209.85.222.182]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gJfBI-0007uG-I9 for pgsql-hackers@postgresql.org; Mon, 05 Nov 2018 13:44:43 +0000 Received: by mail-qk1-f182.google.com with SMTP id 189so14639246qkj.8 for ; Mon, 05 Nov 2018 05:44:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:cc:references:from :organization:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=ngEQ5caT/r7Pm23wOauBDs61FDqTt9Lvlq3FjKSznxA=; b=N31MQecQlCnoPdvjxQijSPm/A/nvUWqBkVeIt8iy14qhq7tmxoIiKl41cCJ4wVrpx1 xqPpw47BppmK4xWIFRZ8iYpiVutXmH0R/F1v7+U3d/bZBfpFMr9UJBvfh0RSFEL+QAC4 M5TY2e0RfrDrs4NqdhN/GFxkLJZGlfTtnfyLDV7WtGFNFQ3aeyu/umV7oDawoxv53X/1 JvvwdoiqhbbRIdkfLV8LwNGqMbBVIHMV5M+1iljeCVmjouVyKQ19VxLP6F9HjyvCqrGj FbyJfUCtsz4I645valO64+RrsJBzEG+3SnbXlzO7bbuNMDsC55MPhu7szekm3ZxIEPaS uTQg== X-Gm-Message-State: AGRZ1gLxQPf17p9ZoDdTOIbwpUOVzT3UREpwK/v9m502nhiMssZMZcDc Pi0EfT94jUpHNdqSiKZH0/8bWw== X-Google-Smtp-Source: AJdET5fO1vWko2a3y1JkePVV/4kGWuBqabH5eFEP+2QSWZhM3EzgIh6s70JX4e3ndqRwK9kMPB6vZg== X-Received: by 2002:a0c:e904:: with SMTP id a4mr20747256qvo.181.1541425477572; Mon, 05 Nov 2018 05:44:37 -0800 (PST) Received: from localhost.localdomain (c-24-61-8-151.hsd1.ma.comcast.net. [24.61.8.151]) by smtp.gmail.com with ESMTPSA id h187sm26413754qke.46.2018.11.05.05.44.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Nov 2018 05:44:36 -0800 (PST) Reply-To: jesper.pedersen@redhat.com Subject: Re: pread() and pwrite() To: Thomas Munro Cc: Tom Lane , Magnus Hagander , Oskari Saarenmaa , Pg Hackers , Tobias Oberstein References: <20180720081459.GC22214@saarenmaa.fi> <7f379440-dfec-70ca-8a0d-942f1381936b@redhat.com> <983a8d48-64fa-e2f7-55c4-41e20bc51ef5@redhat.com> <19344.1539050134@sss.pgh.pa.us> <21196.1539053390@sss.pgh.pa.us> <2145.1539058113@sss.pgh.pa.us> <4cf40b3d-96ed-7597-fb42-e5e29c5a40fe@redhat.com> From: Jesper Pedersen Organization: Red Hat Message-ID: <13bf4246-061f-6187-e881-547a82379f70@redhat.com> Date: Mon, 5 Nov 2018 08:44:34 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Thomas, On 11/5/18 7:08 AM, Thomas Munro wrote: > On Sun, Nov 4, 2018 at 12:03 AM Thomas Munro > wrote: >> On Sat, Nov 3, 2018 at 2:07 AM Jesper Pedersen >> wrote: >>> This still applies, and passes make check-world. >>> >>> I wonder what the commit policy is on this, if the Windows part isn't >>> included. I read Heikki's comment [1] as it would be ok to commit >>> benefiting all platforms that has pread/pwrite. >> >> Here's a patch to add Windows support by supplying >> src/backend/port/win32/pread.c. Thoughts? > > If we do that, I suppose we might as well supply implementations for > HP-UX 10.20 as well, and then we can get rid of the conditional macro > stuff at various call sites and use pread() and pwrite() freely. > Here's a version that does it that way. One question is whether the > caveat mentioned in patch 0001 is acceptable. > Passed check-world, but I can't verify the 0001 patch. Reading the the API it looks ok to me. I guess the caveat in 0001 is ok, as it is a side-effect of the underlying API. Best regards, Jesper