> > > ALTER TABLE my_table > DISABLE INDEX ALL; > +1 This very thing came up in a conversation with PeterG early last year. I was in favor then and I was surprised that the only thing standing in the way was a lack of ALTER TABLE syntax. Creating temporary data structures to mimic existing metadata structures is a pain.
> > It'd be even better to also add a REINDEX flag to COPY, where it > disables indexes and re-creates them after it finishes. But that could > be done separately. > I'm iffy on the COPY change. If we add index rebuilding, why not disabling as well? If the COPY fails, what state do we leave the indexes in? I'm not sure I can tackle this in the current dev cycle, I may have some spare cycles to devote to this, but it's unfamiliar territory. I'm happy to do the grunt work if I had some higher level guidance.