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 1racrf-00AgHe-Ig for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Feb 2024 14:37:27 +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 1racqg-00DfPp-33 for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Feb 2024 14:36:26 +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 1racqf-00DfPS-Oi for pgsql-hackers@lists.postgresql.org; Thu, 15 Feb 2024 14:36:25 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1racqc-007LOs-C6 for pgsql-hackers@lists.postgresql.org; Thu, 15 Feb 2024 14:36:24 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-3394b892691so658892f8f.1 for ; Thu, 15 Feb 2024 06:36:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; t=1708007780; x=1708612580; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=7cBHdi93Ea/LUULkwvk2E0ozHla9HO3aqUTgf7rE7V8=; b=RE2n2lTQ1bzS4Q6pcPelaQqdBFoZu6Cz+kWS3PgbX6MrL7RVq2UGxgOkBepH9zA2N0 ey3IrrekeKjS6xFEsRiDx5jrJ2AjaUUEFCd37kjd7GcACjpd52ogrB+skvef9gbR5S9L UrcVyQhCDPxAdqivBDHLRWHXqPy9rHOBF5jXxGEVJDuz6JBIRElVdtAPMUqJoTdIJzH0 6EfeIUYtG+gwh5Px6kS1G0wlK167tZT/pa+nFn+OBT9cThEqso6Rd7ymjWBQuMDc7NSh QStnFsj/9WNJeEvlJZPLSNyomWH7UT1zU48fThYBynleCVClt0jt5PWc/Q8NKOnjyJl4 jRHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708007780; x=1708612580; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7cBHdi93Ea/LUULkwvk2E0ozHla9HO3aqUTgf7rE7V8=; b=UiVQrX604on2sprSDB4CYcQeuYvuCuAUONc6V2UOUAWnHvKaxTfO/9wBROf1WyQcND a79GuLIVswFAoG9MBnSEzMQVO2AVa88+hLxSiRcCe/Czjo4SoewfG9/BuIVd4D0Iu/9s 2rafQXO7ncyt2CqAJCajTQISOYh/Xsqt8lPs8qP9z3FLuqBbvxXRt0lzu0pgXysoy4mU jbCC+IJDqgEdg8HdZku8dFu0JxS2i29+rRHM9O9aqyaDLNBtER2JV73iwzZaLeB4yEt4 NXNJNFMGSIfeKU7UkNkS6PLNzRF4aCnyRSRAcadMJI8tBoLIjOlfzy+f2YyUF3NRXtEw cZAQ== X-Forwarded-Encrypted: i=1; AJvYcCXBUaMDpyQqvnO5fDuACxSQ65DuKTjn20lW0fNqp8b2IaZwqopxAEVcgKhS3SJNoAuwhu8d8Roz1wjrWk2ARHhJsy3PxeU+hx3RCSNqVi3bnaUQ X-Gm-Message-State: AOJu0YzNEYibA4f8FvChP8t3eqIi6XBRLQ7XGG45PqIcVAZds4vpcrAV FLlPD6SkDRbu2iw3M3wmtS4qr1nFt/AZ/WYsxoCsQmg8x6AHvINGpyxP2aTlsA== X-Google-Smtp-Source: AGHT+IHJGbiTlK4kLQHluyk4PkJ3hpapFdfX5KNSYPJZMWup/9KCs3UF1ngItYDDd8cmFo2KmuuF/A== X-Received: by 2002:a5d:6a8b:0:b0:33c:e084:aaf9 with SMTP id s11-20020a5d6a8b000000b0033ce084aaf9mr2018559wru.4.1708007780483; Thu, 15 Feb 2024 06:36:20 -0800 (PST) Received: from [10.137.0.18] (ip-86-49-229-30.bb.vodafone.cz. [86.49.229.30]) by smtp.gmail.com with ESMTPSA id s5-20020adfecc5000000b0033ce5b3390esm1971980wro.38.2024.02.15.06.36.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Feb 2024 06:36:20 -0800 (PST) Message-ID: <4736207c-8ea6-40cb-ac52-41af00b58bbc@enterprisedb.com> Date: Thu, 15 Feb 2024 15:36:19 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: index prefetching Content-Language: en-US To: Peter Geoghegan , Melanie Plageman Cc: Robert Haas , Andres Freund , PostgreSQL Hackers , Georgios , Thomas Munro , Konstantin Knizhnik , Dilip Kumar References: <8ec36f51-b863-60e3-20e2-b9c981c5ce5e@enterprisedb.com> <482ec3ff-52ad-415d-96fd-f3832a894023@enterprisedb.com> <56176b8d-956c-487e-ab09-310db4581c07@enterprisedb.com> <4867452a-b853-4813-a6da-9bb06a336f8b@enterprisedb.com> <4f5f16ef-df1e-4e09-9b3f-2e0961ab5117@enterprisedb.com> From: Tomas Vondra In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2/15/24 00:06, Peter Geoghegan wrote: > On Wed, Feb 14, 2024 at 4:46 PM Melanie Plageman > wrote: > >> ... > > 2. Are you sure that the leaf-page-at-a-time thing is such a huge > hindrance to effective prefetching? > > I suppose that it might be much more important than I imagine it is > right now, but it'd be nice to have something a bit more concrete to > go on. > This probably depends on which corner cases are considered important. The page-at-a-time approach essentially means index items at the beginning of the page won't get prefetched (or vice versa, prefetch distance drops to 0 when we get to end of index page). That may be acceptable, considering we can usually fit 200+ index items on a single page. Even then it limits what effective_io_concurrency values are sensible, but in my experience quickly diminish past ~32. > 3. Even if it is somewhat important, do you really need to get that > part working in v1? > > Tomas' original prototype worked with the leaf-page-at-a-time thing, > and that still seemed like a big improvement to me. While being less > invasive, in effect. If we can agree that something like that > represents a useful step in the right direction (not an evolutionary > dead end), then we can make good incremental progress within a single > release. > It certainly was a great improvement, no doubt about that. I dislike the restriction, but that's partially for aesthetic reasons - it just seems it'd be nice to not have this. That being said, I'd be OK with having this restriction if it makes v1 feasible. For me, the big question is whether it'd mean we're stuck with this restriction forever, or whether there's a viable way to improve this in v2. And I don't have answer to that :-( I got completely lost in the ongoing discussion about the locking implications (which I happily ignored while working on the PoC patch), layering tensions and questions which part should be "in control". regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company