Re: BUG #19515: Creating a faulty BRIN operator class can cause the server to crash when used.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: 1165125080(at)qq(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19515: Creating a faulty BRIN operator class can cause the server to crash when used.
Date: 2026-06-10 14:38:56
Message-ID: 1286399.1781102336@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Previous Message Amit Langote 2026-06-10 13:27:22 Re: BUG #19484: Segmentation fault triggered by FDW