Re: Corruption with IMMUTABLE functions in index expression. - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Corruption with IMMUTABLE functions in index expression.
Date
Msg-id 20211012030758.3jv62bvgzer5cfip@alap3.anarazel.de
Whole thread Raw
In response to Re: Corruption with IMMUTABLE functions in index expression.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Corruption with IMMUTABLE functions in index expression.
List pgsql-hackers
Hi,

On 2021-10-11 14:59:22 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > Perhaps we could set pg_index.indisvalid to false initially, and if opening an
> > index where pg_index.indisvalid error out with a different error message if
> > TransactionIdIsCurrentTransactionId(xmin). And then use an inplace update to
> > set indisvalid to true, to avoid the bloat?
> 
> I still can't get excited about it ...

Understandable, me neither...


> I doubt we need any code changes beyond changing the indisvalid state.

I was thinking we'd want to throw an error if an index that's being created is
accessed during the index build, rather than just not include it in
planning...


Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Ajin Cherian
Date:
Subject: Re: row filtering for logical replication
Next
From: Tom Lane
Date:
Subject: Re: Corruption with IMMUTABLE functions in index expression.