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 1sjS3G-000ppE-5x for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Aug 2024 23:26:10 +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 1sjS3D-00Bx0o-JA for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Aug 2024 23:26:08 +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 1sjS3D-00Bx0f-8Z for pgsql-hackers@lists.postgresql.org; Wed, 28 Aug 2024 23:26:07 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sjS39-001vDy-6q for pgsql-hackers@postgresql.org; Wed, 28 Aug 2024 23:26:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 47SNPxeN3496382; Wed, 28 Aug 2024 19:25:59 -0400 From: Tom Lane To: Jeff Davis cc: Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: allowing extensions to control planner behavior In-reply-to: <646c3d09475e49a5d1145c91af0ce3fdc3cdee96.camel@j-davis.com> References: <95e423ea042a8d2f85c76ee28feb7a5b10265f4d.camel@j-davis.com> <646c3d09475e49a5d1145c91af0ce3fdc3cdee96.camel@j-davis.com> Comments: In-reply-to Jeff Davis message dated "Wed, 28 Aug 2024 16:15:51 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3496380.1724887559.1@sss.pgh.pa.us> Date: Wed, 28 Aug 2024 19:25:59 -0400 Message-ID: <3496381.1724887559@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Jeff Davis writes: > Beyond awkwardness, one case where it matters is the interaction > between an extension that provides hints and an extension that offers a > CustomScan. How is the hints extension supposed to disable a path it > doesn't know about? This does not seem remarkably problematic to me, given Robert's proposal of a bitmask of allowed plan types per RelOptInfo. You just do something like rel->allowed_plan_types = DESIRED_PLAN_TYPE; The names of the bits you aren't setting are irrelevant to you. regards, tom lane