]> granicus.if.org Git - postgresql/commit - src/bin/psql/common.c
REINDEX CONCURRENTLY
authorPeter Eisentraut <peter@eisentraut.org>
Fri, 29 Mar 2019 07:25:20 +0000 (08:25 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Fri, 29 Mar 2019 07:26:33 +0000 (08:26 +0100)
commit5dc92b844e680c54a7ecd68de0ba53c949c3d605
treea6cd95f2b00c7568491e2feebbfb4b8c58c3b51b
parentd25f519107bff602e1ebc81853fe592d020c118d
REINDEX CONCURRENTLY

This adds the CONCURRENTLY option to the REINDEX command.  A REINDEX
CONCURRENTLY on a specific index creates a new index (like CREATE
INDEX CONCURRENTLY), then renames the old index away and the new index
in place and adjusts the dependencies, and then drops the old
index (like DROP INDEX CONCURRENTLY).  The REINDEX command also has
the capability to run its other variants (TABLE, DATABASE) with the
CONCURRENTLY option (but not SYSTEM).

The reindexdb command gets the --concurrently option.

Author: Michael Paquier, Andreas Karlsson, Peter Eisentraut
Reviewed-by: Andres Freund, Fujii Masao, Jim Nasby, Sergei Kornilov
Discussion: https://www.postgresql.org/message-id/flat/60052986-956b-4478-45ed-8bd119e9b9cf%402ndquadrant.com#74948a1044c56c5e817a5050f554ddee
26 files changed:
doc/src/sgml/mvcc.sgml
doc/src/sgml/ref/create_index.sgml
doc/src/sgml/ref/reindex.sgml
doc/src/sgml/ref/reindexdb.sgml
src/backend/catalog/dependency.c
src/backend/catalog/index.c
src/backend/catalog/pg_depend.c
src/backend/commands/indexcmds.c
src/backend/commands/tablecmds.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/parser/gram.y
src/backend/tcop/utility.c
src/bin/psql/common.c
src/bin/psql/tab-complete.c
src/bin/scripts/reindexdb.c
src/bin/scripts/t/090_reindexdb.pl
src/include/catalog/dependency.h
src/include/catalog/index.h
src/include/commands/defrem.h
src/include/nodes/parsenodes.h
src/test/isolation/expected/reindex-concurrently.out [new file with mode: 0644]
src/test/isolation/isolation_schedule
src/test/isolation/specs/reindex-concurrently.spec [new file with mode: 0644]
src/test/regress/expected/create_index.out
src/test/regress/sql/create_index.sql