Re: Invalid indexes should not consume update overhead - Mailing list pgsql-bugs

From Tomasz Ostrowski
Subject Re: Invalid indexes should not consume update overhead
Date
Msg-id 578B6F00.3080104@ato.waw.pl
Whole thread Raw
In response to Re: Invalid indexes should not consume update overhead  (Greg Stark <stark@mit.edu>)
Responses Re: Invalid indexes should not consume update overhead
List pgsql-bugs
On 2016-07-17 02:09, Greg Stark wrote:
> The real solution imho is to actually clean up failed index builds when
> a build fails.

That wouldn't solve my problem, which is that I need a way to disable
indexes before large update. I believe (but I'm not sure) that Oracle
has this concept:
    ALTER INDEX [INDEX_NAME] UNUSABLE;

Maybe, if an index is in invalid state, update can check which part of
table is already indexed and which part is not. Then it would only
update indexes of this already reindexed part of table. This way
purposely invalid indexes could be marked valid for blocks numbers less
than 0.

This might actually be a win during concurrent index creation as
concurrent updates would not have to update index for all updated rows.

But I don't know if it's feasible from concurrency perspective at all.

Regards,
Tomasz "Tometzky" Ostrowski

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #14254: The postgres service goes down while working with the application
Next
From: Peter Geoghegan
Date:
Subject: Re: Invalid indexes should not consume update overhead