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 1sjOGu-000ICY-8g for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Aug 2024 19:24:00 +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 1sjOGs-009ZgO-6g for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Aug 2024 19:23:58 +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 1sjOGr-009ZgG-O5 for pgsql-hackers@lists.postgresql.org; Wed, 28 Aug 2024 19:23:58 +0000 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sjOGo-001xwx-Tm for pgsql-hackers@postgresql.org; Wed, 28 Aug 2024 19:23:57 +0000 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-715cc93694fso1537781b3a.2 for ; Wed, 28 Aug 2024 12:23:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1724873034; x=1725477834; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=Coa3/5xN/1Rxvs+alSAMXtdIhKNynJnAqHiklw1swbI=; b=w/3Ow9MIstbbPwyVWpd8INw9egDzvdWt0ea+E+/uLWwXO+y4by2wgzu9lUqnHZyyp/ uEH0PvdHEu6bGAGRX4dW/iV3zUNJcsOj3uvO4fsQ6hF9RfDXDZCc5a7lJsye/57y+6rA W9SzlWnNFSoF5FvMuu6nN+YSDn83K/RsTHkp5ZCPe3zHGSjGa3ACkXdIBgAs9hO3P8qT d7tJP4V3NwtkVGvyYI19N0dJySRYI9jnZ8+UtF6Xuifn5+581AjwW2dQKDoviSx8nXP9 ODoWaYKAn7ZgVefxqzhkcIaCektVCZO9boWCTa0GGf+2m6nMMXF8ay3rAnPDUhQcmp5F XMpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724873034; x=1725477834; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Coa3/5xN/1Rxvs+alSAMXtdIhKNynJnAqHiklw1swbI=; b=Ttp7VGPHZoP+UJQwMbiFnAQwxB2ZGmpnjVZp78P9N3wQtBZEdwKYLtyj751xEI0opG QWQVYxazhW5HIE3fz3kgHteclhR+TwhyS8xzSOCFUVX+qyTSDfcHY5IEmaXWpYBa44wh DzeC3GhmVfxhoq4wW6snWjZK6im4lbJ+l8f9EuDO80pN4a/hM0K7DrGA/U8bcuebu8Og qFe/799yqUUQVBhwyQM66oPu8fIKVeRBUj5eNMYJtl2TRf+afFM5G6mtZGvcih5y9VLI Ds8y4ID43i4RXeXaS4JcPs37MXpaJBKntc1syrkvp2ifnvr9Y3bhh6JmaJNtSZX7FwlR xzTg== X-Gm-Message-State: AOJu0Ywj+AEoMw76C2+J4p+pa7deAnPiwutvS2MY41Jpehr2d+9qqNtK H1phnnQK1NikqJ2ERypmi5kCS0GALR7PoSIE3iwG5cBKRfMDEb5wYpLH2Py0Sw== X-Google-Smtp-Source: AGHT+IGnEa4bousqM8DSGmsaQ2Wb+0hhwNF4mib2gxEUY69IWJQ6Qik+52Wcp8PFY0j9Mf9cCqxBQA== X-Received: by 2002:a05:6a00:21c8:b0:714:3acb:9d4b with SMTP id d2e1a72fcca58-715dfc60862mr557290b3a.18.1724873034037; Wed, 28 Aug 2024 12:23:54 -0700 (PDT) Received: from [172.18.11.17] ([12.126.244.130]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71434250f5asm10437001b3a.69.2024.08.28.12.23.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2024 12:23:53 -0700 (PDT) Message-ID: <45e381854544d8125d097c334d0fbf3fbdc7014c.camel@j-davis.com> Subject: Re: allowing extensions to control planner behavior From: Jeff Davis To: Robert Haas , Tom Lane Cc: "pgsql-hackers@postgresql.org" Date: Wed, 28 Aug 2024 12:23:52 -0700 In-Reply-To: References: <2909615.1724693854@sss.pgh.pa.us> <3109294.1724777769@sss.pgh.pa.us> <3118814.1724783090@sss.pgh.pa.us> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2024-08-27 at 15:11 -0400, Robert Haas wrote: > - control over scan methods > - control over index selection > - control over join methods > - control over join order I suggest we split join order into "commutative" and "associative". The former is both useful and seems relatively easy -- A JOIN B or B JOIN A (though there's some nuance about when you try to make that decision). The latter requires controlling an explosion of possibilities, and would be an entirely different kind of hook. Regards, Jeff Davis