Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qnoSR-00C5ZT-VW for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Oct 2023 23:05:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qnoSQ-009wEk-2s for pgsql-hackers@arkaria.postgresql.org; Tue, 03 Oct 2023 23:05:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qnoSP-009wEW-PJ for pgsql-hackers@lists.postgresql.org; Tue, 03 Oct 2023 23:05:37 +0000 Received: from mail-il1-x130.google.com ([2607:f8b0:4864:20::130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qnoSN-008vlh-Pj for pgsql-hackers@lists.postgresql.org; Tue, 03 Oct 2023 23:05:37 +0000 Received: by mail-il1-x130.google.com with SMTP id e9e14a558f8ab-35135f69de2so5074975ab.2 for ; Tue, 03 Oct 2023 16:05:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1696374334; x=1696979134; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=IJHjOXPTIjpnofe/+mqagHKX/B8vbxKm39aC3yo/mcM=; b=QXlXMEINiRBYaWSA0HgQrdjjjqWlRRONzZJ0zEjhb11IuBmcZolbc87FokAebRT9Le tbqAPW8kI58DDiNoawrjZoXqzVulbzAnagCEIUjz9PDUBWKVeTh7WZSWb8oa2xtJVMho DhLZ0pzmLEib9+Y/7++TmAc6PHj8fy5e2E8fqueq4aBwmFKnKtIJl19Y9bFBIgL/bia8 syzTJgUD3kQrlPVa4fUs7FXyplmB5BPnLJlBTt4DN0OP9cok0v/4VyNC7+cCSRL3heBg H4hCV6xmzOdPGP1H/s1u3VdLmf4jMBRPhHm1NsHnjR8FehihgFS2VvDWsDUN/sFW+I4x f+fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696374334; x=1696979134; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=IJHjOXPTIjpnofe/+mqagHKX/B8vbxKm39aC3yo/mcM=; b=iIgjPW34/5w8dDMGxkxJFORUZG1rSrt3MIqO7B8LtKbOmlwrFuAn2IUcceYCqkrhxE um5fFfOyyp7Okcg2RWSlSWh+BWY/Rdr/UgP108YOSeBc5affWmxcPJeDIcCFKDpvq4yo 2NE/Hl85qwtpvTq6n7ux1g7Q52xYV1LTeWTie8c4BgscdQWG2ynKE39AwzRQU/4t2wEy P7bIjtd9flGG+yJV3thgk6ov60+0zNAwtbWI0kgqhNUQhuLGf5Y4imdCNmXCOWwZu1Gh /wJZdU0XGMv2lDAW3iNJXp1oKT6y7bpEBgXOQ41O/Wtj6dH6IESwp3u5Pn/4D+mfGW0U qXVg== X-Gm-Message-State: AOJu0YwI433d6RE6XxuIZmrpgUw6eikl3ZBEEeTDi2sPB1TnGqo6o+35 upqxzry550b4e05mwn/b4bsVxw== X-Google-Smtp-Source: AGHT+IECbiURCKZOYw2d2HaxPCabXw6rDVIZrkAPgqod7q7/IpI72iqAvfzrzaLEb6GPHT1LSvSylA== X-Received: by 2002:a05:6e02:1ca6:b0:34c:bc10:2573 with SMTP id x6-20020a056e021ca600b0034cbc102573mr962984ill.3.1696374333870; Tue, 03 Oct 2023 16:05:33 -0700 (PDT) Received: from [172.18.10.34] ([12.126.244.130]) by smtp.gmail.com with ESMTPSA id e16-20020a62aa10000000b0068fb8080939sm1911134pff.65.2023.10.03.16.05.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 16:05:33 -0700 (PDT) Message-ID: <0d84c025e38673cb575dcf4987d050fe7b1e1a1f.camel@j-davis.com> Subject: Re: Improve WALRead() to suck data directly from WAL buffers when possible From: Jeff Davis To: Andres Freund Cc: Bharath Rupireddy , Dilip Kumar , Kyotaro Horiguchi , pgsql-hackers@lists.postgresql.org Date: Tue, 03 Oct 2023 16:05:32 -0700 In-Reply-To: <20230114203403.4zpg72fw2qb34awf@awork3.anarazel.de> References: <20221212.115717.1183698540772933396.horikyota.ntt@gmail.com> <628b07b79743e2614ab1724f516cbd41560d6551.camel@j-davis.com> <20230114203403.4zpg72fw2qb34awf@awork3.anarazel.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, 2023-01-14 at 12:34 -0800, Andres Freund wrote: > One benefit would be that it'd make it more realistic to use direct > IO for WAL > - for which I have seen significant performance benefits. But when we > afterwards have to re-read it from disk to replicate, it's less > clearly a win. Does this patch still look like a good fit for your (or someone else's) plans for direct IO here? If so, would committing this soon make it easier to make progress on that, or should we wait until it's actually needed? If I recall, this patch does not provide a perforance benefit as-is (correct me if things have changed) and I don't know if a reduction in syscalls alone is enough to justify it. But if it paves the way for direct IO for WAL, that does seem worth it. Regards, Jeff Davis