Re: Making table reloading easier - Mailing list pgsql-hackers

From Corey Huinker
Subject Re: Making table reloading easier
Date
Msg-id CADkLM=dX6Vhi4a2MhHPWeUvTvA-a_cNWKasYs_4cFXzK5jm3kw@mail.gmail.com
Whole thread Raw
In response to Making table reloading easier  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: Making table reloading easier  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers

  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.

pgsql-hackers by date:

Previous
From: Kuntal Ghosh
Date:
Subject: Re: WAL consistency check facility
Next
From: Robert Haas
Date:
Subject: Re: Confusing docs about GetForeignUpperPaths in fdwhandler.sgml