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 1s6PTV-00Bn00-CN for pgsql-hackers@arkaria.postgresql.org; Mon, 13 May 2024 06:47:53 +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 1s6PTT-00FTF8-4J for pgsql-hackers@arkaria.postgresql.org; Mon, 13 May 2024 06:47:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s6PTS-00FQwD-MF for pgsql-hackers@lists.postgresql.org; Mon, 13 May 2024 06:47:51 +0000 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1s6OMX-000jwJ-IV for pgsql-hackers@postgresql.org; Mon, 13 May 2024 05:36:49 +0000 Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2e538a264f7so35643561fa.0 for ; Sun, 12 May 2024 22:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715578553; x=1716183353; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bJzNzHQMm90DWKkGYGOdBdS4HCgEKVINcMUO4SOYbNw=; b=iG53yIP8WrkPIHm9d50ELEc6MHwM8Sqepo7wgOCP8I8LnRD9jTWMAMHqUHq6rJUBj3 BOwTL9nwul+GtmIaeGiu0IT1dzbbpdSQgkXR8w1PNVxQ0jZy2ZVAnvZpew3bVEy2Pu58 mGPzYqgvAziH8R0gwwmMN85N28YIqKrZgi9s8VumtrrCsG70oGkchX3YDXqIUd+bAzb0 mzwSr2o+H32dV4TMaQgZ5PgyL6BCCah6hQRUEqqJcG3xuJDlHg4KmrjF/NQqOGKe4dPb jBUuFdjvi+5F+qeUiFxlsxQDrBmSOD5qpBWim5AiT6OKmUqLUs3+ioGww8ZknI6cuzzM Nw3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715578553; x=1716183353; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bJzNzHQMm90DWKkGYGOdBdS4HCgEKVINcMUO4SOYbNw=; b=wG0cz+0rbZHkAEit524fvjo6+bsx1sLQ/XCJJN39jX+pAGNF/k7Oq/5pqLtYFX+7jE ATFb4+IbrVUjhlqDFPeyMJSiP5ufS+6Vd8A2sk6mXAJbKieD3BV9bQt+ffTdjJmFtTKx wxnpib+IC5EqUo+o/fQtrZV8Lm4HwnS2isS1Oh9SwJzTZJyH6C6rfy4AOJ3uB4X2bZ6F a81IMNVsEKYN8ETXIUiyYU1zmj2p7H2IscT7HCnEC0oj17dIVGu2Ps7bjCV/2aY5ereV od32KvJFT8t+QU93XXQlmPrzrYz/f1WYdUuDZauFJRl8URMr6sCJqxeDxlcWBIpoFomZ r8Qw== X-Gm-Message-State: AOJu0Yyi6cMCxBokU3IoObpetNmWRRCQZBqcU+O/8itPRwbD9CruabJN vvhlzc1FberFc74N/2PxPPu74qLUmj3LT/FEsIvUsIrQsOmuzaY519GGZufd21kf1+xuEZKgzIM cnjpSuzmP+2FjsaVQHrzxvEYbwaK7LlQM X-Google-Smtp-Source: AGHT+IFIjuH3J48jWMmUE6YUq2S5p8p+7ErjNH5rvKm50+zdhwFm0RsGKSvZ7IT3hQVlNsfMtna/r07lcrm+y2BMJMo= X-Received: by 2002:a2e:8004:0:b0:2da:ea02:3655 with SMTP id 38308e7fff4ca-2e51fd2e798mr60009331fa.4.1715578552701; Sun, 12 May 2024 22:35:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bharath Rupireddy Date: Mon, 13 May 2024 11:05:40 +0530 Message-ID: Subject: Re: Use WALReadFromBuffers in more places To: Jingtang Zhang Cc: PostgreSQL-development Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, May 8, 2024 at 9:51=E2=80=AFAM Jingtang Zhang wrote: > > Hi, Bharath. I've been testing this. It's cool. Is there any way we could > monitor the hit rate about directly reading from WAL buffers by exporting > to some views? Thanks for looking into this. I used purpose-built patches for verifying the WAL buffers hit ratio, please check USE-ON-HEAD-Collect-WAL-read-from-file-stats.txt and USE-ON-PATCH-Collect-WAL-read-from-buffers-and-file-stats.txt at https://www.postgresql.org/message-id/CALj2ACU9cfAcfVsGwUqXMace_7rfSBJ7%2Bh= XVJfVV1jnspTDGHQ%40mail.gmail.com. In the long run, it's better to extend what's proposed in the thread https://www.postgresql.org/message-id/CALj2ACU_f5_c8F%2BxyNR4HURjG%3DJziiz0= 7wCpQc%3DAqAJUFh7%2B8w%40mail.gmail.com. I haven't had a chance to dive deep into that thread yet, but a quick glance over v8 patch tells me that it hasn't yet implemented the idea of collecting WAL read stats for both walsenders and the backends reading WAL. If that's done, we can extend it for WAL read from WAL buffers. -- Bharath Rupireddy PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com