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.96) (envelope-from ) id 1w5Eq5-0032on-0z for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Mar 2026 03:23:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w5Eq3-00BCu7-1m for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Mar 2026 03:23:23 +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.96) (envelope-from ) id 1w5Eq3-00BCtz-0q for pgsql-hackers@lists.postgresql.org; Wed, 25 Mar 2026 03:23:23 +0000 Received: from mail-oa1-x34.google.com ([2001:4860:4864:20::34]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w5Eq0-00000000zeN-3nqd for pgsql-hackers@postgresql.org; Wed, 25 Mar 2026 03:23:23 +0000 Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-41c420d1460so1237206fac.3 for ; Tue, 24 Mar 2026 20:23:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774408999; cv=none; d=google.com; s=arc-20240605; b=g5uy35o4Lqiuu5JvES+aEl+lVOCBaJSKFhtKpiqNSMiWGqr4hdS11UwBpGt1SGfKQF vSXaWcXb2Z4Y/RSdxa5fB4807lSTqMCmhI0zFway7qpUT4LM+jlPcDu65taDBNNSiNAx VABZ3e/g3G2ocJgW5rjK1A3TrIslPvrBkOYibkCPpLTcVN5TqCyjuWRcSSWoPCWh6vdW RWJhKXBej/o8tw5E7rkI1ACcepabHKe7Ja/CokpW13uBJM3nyXD9nekza4PGKr7NEz1v FUVpmsaNgpN/9joC5aRA5LKFmcZ3nfhkWUkRdqowq4xtS0rytKYUc3VL5NoubqTd1qkX jpVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=egkMJ9kYWhpInHD875pHMune3Pam1oNPbqd+WKGBc5U=; fh=zS4rrLV8eL5avYyQNNiPeEPLuhB7i3kaLQPN3dkuT3s=; b=FJScNyrXT0Yznj49H0hpIAeHS8gCn9KnVSMcx8WK130HuS6MmJ1AyMjPC2fX9VILWV Id9t6G4H5Nc2U7iM6fQet5E/xyYlGXrc3CfaJ38lO/Y1lX90u7Y/x1Ep7fFYlHlhh2Kx 1yYTeCeEgN9Mbr9377GAskG58FUAklBTPr/g6/OGOJc+bh9oiTWhqbUb/C42Wv28wrfC Z6DeLczyoCC50F4rIIEPu3GoC1+wDm7nA4ltPAlr0kbctWnLxx5stYOJHbXDR2amk+Ff QsM3f+xgjeChjYUv/GfygIHrdYuvwyBsVCIlbeP7OPTH71vCjg0zX58/IpY67AfiE83d mWyw==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774408999; x=1775013799; 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=egkMJ9kYWhpInHD875pHMune3Pam1oNPbqd+WKGBc5U=; b=hd+1OTE21ByiqSGVgzM++FMFyX4f5HcscQYBXiEYCqBZ0Nip3i5hYXFNljQwdcm2nS jJcGAjSWhZskYxa7MHuUyZCMANCpmX7DfHJb/EPnfn9E+ADNNxh1qiRqqPMUIgGm95OC vsjG0AEcprludkOZqWwS5ieisiHPGrJf0+xIO8nYM5EXn9a4VScHQKtr+B0uqYHS0R9j L/grDch15vw8/12zp0QjJdUjzmgFmJA+ODd0YBEKn+rMUukOFbBVZsUUhNs/0K89coUi 8bUbeijPlbkhYiZ6xnFJeTBEOJnxdJDYsFBsA+q6b43DLdyRI6hqJAGHXZMoxvXGLOqY vZXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774408999; x=1775013799; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=egkMJ9kYWhpInHD875pHMune3Pam1oNPbqd+WKGBc5U=; b=U2rGhMYF3njPJdvhFdUOvoSkkKrkQ6ED5lllJHc2an1YMqCblq04LVecwQl29MEBGE Nd1ijK0il0jqwQrp0qu8tJp/i4efG+VV0y77qygW5wK+fJ7/d32scWHWbbuqsGt/xp/b PmJwkBDuMZ3XvyTLGEP5n5t/LNsYdcEfDHURG04A1K9wPi7QLsc3c9MrjP7JaWUR0Iqj J5T2iazqZ5N5KkrkZ51mAVhIRz0loFEnTA/l2izAxWze50uPEeg7vraOCVnAsQeLQshN aDNB1KF7VycTQFTuCMhyswjq2exi88DVUGsRuui8xh8hpfwGFBb2cpFVX3UrWaFW1ig6 v6Cw== X-Forwarded-Encrypted: i=1; AJvYcCWL3Iz/2cLdUrshQQsjcWgqmZjMftOy2gC1b0l8WflNPIFbVxr3a8U+YjNU0vkcBilgUM/1cGayu6m/thcU@postgresql.org X-Gm-Message-State: AOJu0Yzm5NgUO5BjalqdN1sIuvfZKPeZxSZkf4MtoPEO2A45mIGcQBOu AFtUYDw68SbaWgzxd2YYATvoTn0Ja7eNiYqB9oBNNWJEOf2TkFTRTKyQBOUkH7m09gySo/j64Nl r5wd/5gQzpRe+8L02Be3TYzQ3z+QbaN0= X-Gm-Gg: ATEYQzzgFTIWb/G4hH4zviYIPa152dGhmqaitEtPBHO3eRrt1jcbYNojyPYGy8feeT9 eiwOaEtf9zSngBBmrIIEyXYxIAfnLbRzY7ad0FOEb25ABrG2Yoh7ubqGPtsVxw2wwfQhp2aM4x3 7gvbLjxb6B0RVmSonVurqFiFZPg3BOmChLFAjj5lEKGpYYEQm6LzItXYdeQYSR/FqgXFXQHKx1J 1wf/67XpbCkjm4+ziCLeSAcvLtJQbRSU5bZ2KSTCBA+V8ZwU8xCPnkdGKxMTLIbY6lHkPRHTtRD ig29tfiTJQMEVfvjLEVZqqQyGPB9hh6bXrC8yPA1wuBthgUMWw== X-Received: by 2002:a05:6820:1c99:b0:67d:e810:1ddc with SMTP id 006d021491bc7-67dff622a82mr1056103eaf.70.1774408998880; Tue, 24 Mar 2026 20:23:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bharath Rupireddy Date: Tue, 24 Mar 2026 20:23:07 -0700 X-Gm-Features: AaiRm51yhdaH_RlZhY9tWcmTNoDNiR4WDu7TYAVwB1B6Iw7eXRwqy7O4esjS5wQ Message-ID: Subject: Re: log XLogPrefetch stats at end of recovery To: Lakshmi N Cc: Jakub Wartak , Thomas Munro , SATYANARAYANA NARLAPURAM , pgsql-hackers@postgresql.org 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 Hi, On Tue, Mar 24, 2026 at 5:07=E2=80=AFAM Lakshmi N = wrote: > >> so instead of like: >> redo prefetch stats: prefetch=3D%lu, hit=3D%lu, skip_init=3D%lu, >> skip_new=3D%lu, skip_fpw=3D%lu, skip_rep=3D%lu" >> >> something like below ones: >> redo prefetch stats: done %lu prefetches, %lu hit, %lu zero-initated, .. >> redo prefetch stats: done %lu prefetches, (%d% hit ratio), %lu >> zero-initated, .. or something like that > > Please find the attached patch with the suggested changes. I referenced [= 1] to log the message as suggested. > > 2026-03-24 04:53:15.251 PDT [18898] LOG: redo prefetch stats: prefetched= 27 blocks, skipped 22 blocks because they were already in the buffer pool,= skipped 17 blocks because they would be zero-initialized, skipped 0 blocks= because they didn't exist yet, skipped 28 blocks because a full page image= was included in the WAL, skipped 155 blocks because they were already rece= ntly prefetched. IMHO, the above looks too verbose. +1 for Jakub's suggestion. Would something like the below work? I believe the developers looking at these logs for analysis will have some understanding of what each of these means. LOG: redo prefetch stats: prefetched 27, skipped (22 in buffer pool, 17 zero-inited, 0 non-existent, 28 FPI, 155 recently prefetched) -- Bharath Rupireddy Amazon Web Services: https://aws.amazon.com