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 1qLRA3-0037BL-3H for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Jul 2023 16:33:23 +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 1qLRA1-00C9rR-NH for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Jul 2023 16:33:21 +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 1qLRA1-00C9rJ-EC for pgsql-hackers@lists.postgresql.org; Mon, 17 Jul 2023 16:33:21 +0000 Received: from mail-wm1-f47.google.com ([209.85.128.47]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qLR9y-000vuQ-KX for pgsql-hackers@postgresql.org; Mon, 17 Jul 2023 16:33:19 +0000 Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-3fb4146e8deso49165095e9.0 for ; Mon, 17 Jul 2023 09:33:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689611597; x=1692203597; h=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=8Z56635emAT9Q1FhvlVPlQ0wZhw5H0DTaNvNV9zaEFc=; b=cQ3RGo4WDbqCzY/THKoBGM8NOUk7V+lC7cvcNzoS1TkLAkZc5iA/vr2hAPNr1ypUSz ePHTspgk95BDl3vGmgvZKdSJCUe0tnmFQwh4vuxLkjkrbGr4GwncgVHpRmDYzmH6icQs n80vlwN0aiFdwVLc+72Olj7+lXrl5ujSIJlJUV+UZgFLHQd8Yn9kYX57Ne//gkoZO17q MJ4LH45D8SPKN8GC1/GIdddXgcE8VFuLyzeJBCEEWosUNXl+t7fnph5/E175OL5Z0eob VT/DhWN7lbfICwxdzQdd6FoOTKvD2v1dJqTAl+4Fit3xxH9Mh2ZUjICk0phlif7lObQY HapQ== X-Gm-Message-State: ABy/qLZ6ZICt9AqnWIoSIokB2OkOW32mfOgWHwPhKp/PjlQgv8/kvQyA hvxQDfNK2wklrdvfYjzFIpVIlWrZTMJcJXWGoTE= X-Google-Smtp-Source: APBJJlE5i+qyjG8AQ0aeihhnIs7w0emY9GEXBGaafPVvNidbUqrPUwiWpFCD1jsVaASFj/gv7vwpTl6QEP3RgMvAz7I= X-Received: by 2002:a5d:660c:0:b0:313:f957:bf29 with SMTP id n12-20020a5d660c000000b00313f957bf29mr13538158wru.65.1689611596844; Mon, 17 Jul 2023 09:33:16 -0700 (PDT) MIME-Version: 1.0 References: <20221221101846.7zsi7lscnm5ediik@alvherre.pgsql> <1350682.1671635927@sss.pgh.pa.us> <4191508.1674157166@sss.pgh.pa.us> <349124.1674185509@sss.pgh.pa.us> <20230207180855.xy5m4puwh5gzd7xy@awork3.anarazel.de> <1274885.1680558101@sss.pgh.pa.us> <9D23D8BB-83EE-451E-95C1-CF42ADB76869@yesql.se> In-Reply-To: From: Thom Brown Date: Mon, 17 Jul 2023 17:32:51 +0100 Message-ID: Subject: Re: generic plans and "initial" pruning To: Amit Langote Cc: Daniel Gustafsson , Tom Lane , Alvaro Herrera , Andres Freund , David Rowley , Jacob Champion , PostgreSQL Hackers , Robert Haas Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 13 Jul 2023 at 13:59, Amit Langote wrote: > In an absolutely brown-paper-bag moment, I realized that I had not > updated src/backend/executor/README to reflect the changes to the > executor's control flow that this patch makes. That is, after > scrapping the old design back in January whose details *were* > reflected in the patches before that redesign. > > Anyway, the attached fixes that. > > Tom, do you think you have bandwidth in the near future to give this > another look? I think I've addressed the comments that you had given > back in April, though as mentioned in the previous message, there may > still be some funny-looking aspects still remaining. In any case, I > have no intention of pressing ahead with the patch without another > committer having had a chance to sign off on it. I've only just started taking a look at this, and my first test drive yields very impressive results: 8192 partitions (3 runs, 10000 rows) Head 391.294989 382.622481 379.252236 Patched 13088.145995 13406.135531 13431.828051 Looking at your changes to README, I would like to suggest rewording the following: +table during planning. This means that inheritance child tables, which are +added to the query's range table during planning, if they are present in a +cached plan tree would not have been locked. To: This means that inheritance child tables present in a cached plan tree, which are added to the query's range table during planning, would not have been locked. Also, further down: s/intiatialize/initialize/ I'll carry on taking a closer look and see if I can break it. Thom