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 1urmV3-00CM34-CE for pgsql-hackers@arkaria.postgresql.org; Thu, 28 Aug 2025 23:57:50 +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 1urmV2-005STS-G8 for pgsql-hackers@arkaria.postgresql.org; Thu, 28 Aug 2025 23:57:49 +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 1urmV2-005SSg-2E for pgsql-hackers@lists.postgresql.org; Thu, 28 Aug 2025 23:57:48 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1urmUz-002Gl2-2m for pgsql-hackers@lists.postgresql.org; Thu, 28 Aug 2025 23:57:47 +0000 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-3cd59c5a953so959797f8f.0 for ; Thu, 28 Aug 2025 16:57:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bowt-ie.20230601.gappssmtp.com; s=20230601; t=1756425464; x=1757030264; darn=lists.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=3gEqN7F0Ru0ZQB6V8bHMoTFBeeNmPzhrD2FQk0gEwjM=; b=RtXTnLd5jsPNrX6ghKO0Cm1rLeHW1aPu12C/npy7Lj7CkYVf2yXjh7P0gcYK8I0CvK sHKFa3FAXYTVtZJbvMbVr6mw8ebdSI8EwHufYD4gsFZiKYKywUmsAZufrjTF9Agte039 TPknL3y3cAoavGqMkqeI/xD7GujlDv5UAB7aphp0NQLNko1cxGjnXUUkFpOzIZAbge12 8ba2S6k0M7CVfUEtI0t5BvFEBjmyckH8YFG5Nm9K4pBif8x0Ug4qS8YFf6ufCHm7LrXx KwglDA0k0RduvKtpN0MOxq3kUooBYOlHfPq7KgBnpnhTHOYF0gR3x0+Gv6w0RtiUdEIm Im7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756425464; x=1757030264; 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=3gEqN7F0Ru0ZQB6V8bHMoTFBeeNmPzhrD2FQk0gEwjM=; b=P3dxsRsNUF4Ek7laJGIoCEG2zOSiMcUMn2qMX9SYXAnm+x+YsXbgzcT35IjLtvoN8l Cb0topxyu3+PSPqyUCPXkpzMe1M8qX6QWn5re4QliNyAimrnHtAim9HPAPKSGLVdIpCB ZlRqqHTgUUbNHmqfuk/wdeHj9k1VeSvtAYCwJH+i7KAm5N4Z/Ydu1CJ5DNxzDdGhcHXn LslZdEFkBmVAcFQMp8ArCej56Fe9S6eMKNr1JJ3AOgoXDAREx01+dwJcZv0VEyJ8ZEde p3zRpXp68fpphr8icnK46LeGzDcOvMmRS7/vDofIbBucMFPiYm0IDubbmRy+NWZCoN7t 1hhw== X-Forwarded-Encrypted: i=1; AJvYcCWQPwUKpPP/Ba3+DMsuYbxoyjzWGB0UmzhstauYpuZvC0CBmjuoLkfdVG1Y9T+rZsHmFXK0hH72syc4gh0J@lists.postgresql.org X-Gm-Message-State: AOJu0Yy2LMjI9dK5UzTVOFlbVi/dmoYjSbPSOAW9yGHpXRw4vBIr20FZ V/8xYWe+amFI2yBcYdTqcfm2jcHXloIrbSbgL1U7McnG2EAGO1T6/8CyL3iNPmolsRlGvHG68zE r2cB9dcVg7AGWzTKZOLFEce8k8vGO6oVsG4GjILq3HQ== X-Gm-Gg: ASbGncsnTxA3q1sflG/0dSbu6NLu/jimP+jQbTSCr2wVgONUGjdvGJ3jC0CL61KCiuL w2cL9SdJZ1zf74biC8jCCPbM+DpYMWPBCS+pX7qGQNsr6ISk343ffKpOM/3ePDZY7ohAbhmXxs4 cffe2sNWuGFG4JQ+oVRWaa8ZHOgTU2KzeM2v5FCK259l59e1e92C0oY5YZzoQqOkWvpvhtQOcTS GQDYdQ= X-Google-Smtp-Source: AGHT+IGJlYuWHI6khwNeoT1qV5diRHdIRX8d/eIxH+60sfGTDP/+r+ZeHVTdAwjDqLhmrqbvILGglVebcmuksQ5Sm9Y= X-Received: by 2002:a05:6000:240c:b0:3c9:9ec0:203b with SMTP id ffacd0b85a97d-3c99ec02f4bmr13366230f8f.27.1756425464042; Thu, 28 Aug 2025 16:57:44 -0700 (PDT) MIME-Version: 1.0 References: <6butbqln6ewi5kuxz3kfv2mwomnlgtate4mb4lpa7gb2l63j4t@stlwbi2dvvev> <0dd33755-cab8-49c8-b1ed-698732577fbb@vondra.me> <1c9302da-c834-4773-a527-1c1a7029c5a3@vondra.me> <6d59c277-c440-4d1f-a46e-157958c06a5f@vondra.me> <5pltwb73d7cynsxo2yb54ygjk7haviatkrx43mnzihc6kkield@ahnstpgof46i> <931afce3-8c86-4c96-9861-0ffa17c6560f@vondra.me> In-Reply-To: <931afce3-8c86-4c96-9861-0ffa17c6560f@vondra.me> From: Peter Geoghegan Date: Thu, 28 Aug 2025 19:57:17 -0400 X-Gm-Features: Ac12FXxGSDO0HAKXTWTIqmEL-_cToopBp_qn1ZMVAuRHLjjSahdX9KV5B3xDWxY Message-ID: Subject: Re: index prefetching To: Tomas Vondra Cc: Andres Freund , Thomas Munro , Nazir Bilal Yavuz , Robert Haas , Melanie Plageman , PostgreSQL Hackers , Georgios , Konstantin Knizhnik , Dilip Kumar 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 Thu, Aug 28, 2025 at 7:52=E2=80=AFPM Tomas Vondra wrot= e: > Use this branch: > > https://github.com/tvondra/postgres/commits/index-prefetch-master/ > > and then Thomas' patch that increases the prefetch distance: > > > https://www.postgresql.org/message-id/CA%2BhUKGL2PhFyDoqrHefqasOnaXhSg48t= 1phs3VM8BAdrZqKZkw%40mail.gmail.com > > (IIRC there's a trivial conflict in read_stream_reset.). I found it quite hard to apply Thomas' patch. There's actually 3 patches, with 2 earlier patches needed for earlier in the thread. And, there were significant merge conflicts to work around. I'm not sure that Thomas'/your patch to ameliorate the problem on the read stream side is essential here. Perhaps Andres can just take a look at the test case + feature branch, without the extra patches. That way he'll be able to see whatever the immediate problem is, which might be all we need. --=20 Peter Geoghegan