Re: BUG #18244: Corruption in indexes involving whole-row expressions

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, nik(at)postgres(dot)ai, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18244: Corruption in indexes involving whole-row expressions
Date: 2023-12-14 05:43:26
Message-ID: ce4165ffeac66281faa05cd9fc5ceabebe210af0.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, 2023-12-12 at 23:04 -0500, Tom Lane wrote:
> Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> writes:
> > Should we forbid composite types in index declarations? Sounds posssible,
> > but very restrictive.
>
> That would make a lot of people very sad, I fear.
>
> I think a minimum answer could be to document that you might need to
> REINDEX such indexes after a change in the composite type. We could
> perhaps try to be more proactive, say by marking such indexes invalid.
> I think though that that would have deadlock problems as well as race
> conditions. Perhaps best to leave it at "reindex when necessary",
> especially in view of the tiny number of reports to date.

I agree. How about the attached documentation patch?

Yours,
Laurenz Albe

Attachment Content-Type Size
0001-Document-the-dangers-of-composite-type-columns.patch text/x-patch 1.4 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message hubert depesz lubaczewski 2023-12-14 08:08:34 Re: about psql copy ,we would like to seek help,Thanks.
Previous Message PG Bug reporting form 2023-12-14 05:32:49 BUG #18248: Expression is always zero