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.96) (envelope-from ) id 1wXK58-003C4Q-1K for pgsql-bugs@arkaria.postgresql.org; Wed, 10 Jun 2026 14:39:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wXK57-00C5LI-10 for pgsql-bugs@arkaria.postgresql.org; Wed, 10 Jun 2026 14:39:01 +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.96) (envelope-from ) id 1wXK57-00C5LA-08 for pgsql-bugs@lists.postgresql.org; Wed, 10 Jun 2026 14:39:01 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wXK54-00000002LaG-3tl4 for pgsql-bugs@lists.postgresql.org; Wed, 10 Jun 2026 14:39:00 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 65AEcuL71286400; Wed, 10 Jun 2026 10:38:57 -0400 From: Tom Lane To: 1165125080@qq.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19515: Creating a faulty BRIN operator class can cause the server to crash when used. In-reply-to: <19515-d3c30c3a8bf99ee9@postgresql.org> References: <19515-d3c30c3a8bf99ee9@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Wed, 10 Jun 2026 08:23:27 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1286398.1781102336.1@sss.pgh.pa.us> Date: Wed, 10 Jun 2026 10:38:56 -0400 Message-ID: <1286399.1781102336@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > Creating a BRIN operator class with a support function that has a wrong > signature (e.g. accepting text instead of internal) succeeds at DDL time, > but crashes the server when a BRIN index using that opclass is created. This is not a Postgres bug. The reason that opclass creation is restricted to superusers is that the system trusts opclasses to behave according to spec. We'd check that rather than just assume it if it were practical to do so, but it's not really (see the halting problem for starters). We could close a small fraction of the possible crash causes by improving assignProcTypes, but that would be a feature improvement not a bug fix. regards, tom lane