Re: BUG #17872: Dropping an attribute of a composite type breaks indexes over the type silently

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alexander Lakhin <exclusion(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Subject: Re: BUG #17872: Dropping an attribute of a composite type breaks indexes over the type silently
Date: 2023-03-28 19:18:30
Message-ID: 3653799.1680031110@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Alexander Lakhin <exclusion(at)gmail(dot)com> writes:
> So I agree, that disabling the drop operation when a composite type has
> dependencies is not a harmless change. On the other hand, the code might be
> not ready to deal with the uniqueness assumption violated.

Well, corrupt indexes are a fact of life and probably always will be,
because collations are such an unpredictable mess. So if we have anyplace
that is straight out Assert'ing that uniqueness holds, I'd say that that
needs reconsideration. We need to try to turn it into a helpful error
message.

> #5  0x000055d3131e314f in ExceptionalCondition (
>     conditionName=conditionName(at)entry=0x55d313357b85 "next_index == nparts",
>     fileName=fileName(at)entry=0x55d313357887 "partbounds.c", lineNumber=lineNumber(at)entry=884) at assert.c:66

Hmm. I did not trace this down, but it doesn't look like it's exactly
connected to corrupt indexes.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2023-03-28 19:31:42 Re: CTE subquery referencing phantom records
Previous Message Andres Freund 2023-03-28 18:38:43 Re: BUG #17871: JIT during postgresql_fdw remote_estimates EXPLAIN have very negatively effect on planning time