Re: Potential optimisation for the creation of a partial index condition over a newly created nullable, non-default-valued column?

2020-06-06 Thread Tim Dawborn
On Fri, 5 Jun 2020 at 20:15, David Rowley wrote: > While it could be technically possible to do something like check the > xmin of the pg_attribute record for all columns mentioned in the > index's predicate all are set to the current transaction ID and the > index predicate refutes an expression

Potential optimisation for the creation of a partial index condition over a newly created nullable, non-default-valued column?

2020-06-03 Thread Tim Dawborn
Hi all, I was playing around with ways to make a schema change recently to a ~30M record table. I wanted to add a new nullable, non-default-valued column to this existing table, and then add a new partial to that table, where the partial index condition refers to a value in that newly added column