CREATE INDEX CONCURRENTLY new_index_name ON table_name (column_name);
DROP INDEX CONCURRENTLY old_index_name;
- /* if you wish, you can rename your index to match the old index name */
ALTER INDEX new_index_name RENAME TO old_index_name;
Note that using this method means you will briefly have two copies of the same index, so if disk space is an issue you may need to take other approaches.
CREATE INDEX CONCURRENTLY new_index_name ON table_name (column_name);
DROP INDEX CONCURRENTLY old_index_name;
- /* if you wish, you can rename your index to match the old index name */
ALTER INDEX new_index_name RENAME TO old_index_name;
Note that using this method means you will briefly have two copies of the same index, so if disk space is an issue you may need to take other approaches.