On Tue, Dec 30, 2014 at 03:11:50PM -0500, Tom Lane wrote:
> So there are two separate bugs/symptoms here, but I think we can
> fix both of them with one change: we need the new index to appear
> invalid for queries/updates until we're done building it. We
> could implement that (in 9.2 and later) by creating the pg_index
> row with indislive = false and updating it to true after the build
> completes; but that's a tad annoying since it means every index build
> leaves a dead pg_index row behind. (Unless we do the update in-place,
> which I think would work but it's still pretty ugly.)
>
> Or we could hack things up by having RelationGetIndexList consult some
> internal-to-the-backend state so that it knows which index builds are
> in-progress and leaves those indexes out of the indexlist. That seems
> a bit messy too, but it would avoid one catalog update, and would stand
> a better chance of being back-patchable to before 9.2.
Uh, where are we on this?
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +