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 1gK9to-0002kF-T5 for pgsql-committers@arkaria.postgresql.org; Tue, 06 Nov 2018 22:32:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gK9tm-00073l-0L for pgsql-committers@arkaria.postgresql.org; Tue, 06 Nov 2018 22:32:38 +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 1gK9td-0006K4-H6 for pgsql-committers@lists.postgresql.org; Tue, 06 Nov 2018 22:32:29 +0000 Received: from mail-yw1-xc2e.google.com ([2607:f8b0:4864:20::c2e]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gK9tZ-00033B-N7 for pgsql-committers@lists.postgresql.org; Tue, 06 Nov 2018 22:32:28 +0000 Received: by mail-yw1-xc2e.google.com with SMTP id h21-v6so5848820ywa.3 for ; Tue, 06 Nov 2018 14:32:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=oFy81NYTOlG5qwZ88ULIKpTVRluj/PwN/o3T9JAcvU4=; b=k09p0cuoOVp38Nmyf6q/c0BmnNNWdb8q5bVA5uaF5KAAjLhZjQgLZA/B423ewhFC2J 3eu0ek4x3sDL1JxpxUxNa41weXG3hX0Ls6E0u1sFV9eVhx1NQDNy9IihjFFIZIYGfTmf uhJcuM7ZNw8lQaaQ0D6oWNn4izLgBa0DeEDt/q4KQD2fnIggZsWkRfoFLVUqFfW7fLPx /xBCloBDVPCVyLNwjR32D3/8vyLZkgWVLshNKVdC9fYpVB55uGNOLMSvD8AyFsNgF9qo VuLlqON95isBxq1HsPET2f933n0v4u5WOzp+cu2VE8Ib8G1Aao7q3qJJ8eFAzQtZ9znB yWTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=oFy81NYTOlG5qwZ88ULIKpTVRluj/PwN/o3T9JAcvU4=; b=Jg7+Z8eyD6rKNH0uN6R9AKEXrnr7gpAsVCQs2RrhyB9ZthVj8TG3ql/JBgBZch+UPG caA5fXQNcHrIAYJmtPcq4mhC9x4O2ZldkZMcyCBMshmHySaYXZVHe2qxe44n3t5lEeYR UNJx6NfRIDbOeg9lLNv1LykHpVHeezrIcqIr5xtC4jy0ed/rSw7BttzmW8Jq/bidBhDt I7zpufc0Tui9Y0VlYCg3rtlr/eI8QAxXWjxRk0Ibjx2vk6qTkWaizw96VlbaEBjEJCNk bxPgwuGIsxFivJJWGaop4h0MySIuc0yXfjCEEA40kOiW/PQheFtD9s5ulIJrYgdmTtaa E0Nw== X-Gm-Message-State: AGRZ1gI0vf/GIlKxBMypOJEK2CqTxQ3X5yAoQVFdAbbRnuud+/rwOd/P iGMqw4nZHwuYciFcofed1p+wECYZ2cFsabHtlYn2ckKdJLDDpsbmndYL/dP8HXveeRaqLMRoTOV saPKkzkR8J2EcJVDa97uj43ALAEV8c5fSbF/qlaolqTObFoqZ38pkppnSjz68Ah+a3Q7niCSgyb d1HZ1irJyoE6hLtn2tEfb41nXOmjI= X-Google-Smtp-Source: AJdET5cHAIUoUuiejWR4NV7glrEfGDPC0Op1oQvEM1XMuhSTv5jRsBabFK2JShD17Bmg9b8bKBKJRg== X-Received: by 2002:a81:3e22:: with SMTP id l34-v6mr26843152ywa.28.1541543542448; Tue, 06 Nov 2018 14:32:22 -0800 (PST) Received: from [192.168.10.146] ([98.122.175.38]) by smtp.gmail.com with ESMTPSA id 203-v6sm9525298ywz.87.2018.11.06.14.32.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Nov 2018 14:32:22 -0800 (PST) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: pgsql: Use pg_pread() and pg_pwrite() for data files and WAL. To: Thomas Munro , pgsql-committers@lists.postgresql.org References: Message-ID: <2d52ff4a-5440-f6f1-7806-423b0e6370cb@2ndQuadrant.com> Date: Tue, 6 Nov 2018 17:32:21 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-MW List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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