]> granicus.if.org Git - postgresql/commit
Report progress of CREATE INDEX operations
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 2 Apr 2019 18:18:08 +0000 (15:18 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 2 Apr 2019 18:18:08 +0000 (15:18 -0300)
commitab0dfc961b6a821f23d9c40c723d11380ce195a6
tree106f18249990aa4da0e3e49a9bf957b8a42f34e5
parent4d0e994eed83c845a05da6e9a417b4efec67efaf
Report progress of CREATE INDEX operations

This uses the progress reporting infrastructure added by c16dc1aca5e0,
adding support for CREATE INDEX and CREATE INDEX CONCURRENTLY.

There are two pieces to this: one is index-AM-agnostic, and the other is
AM-specific.  The latter is fairly elaborate for btrees, including
reportage for parallel index builds and the separate phases that btree
index creation uses; other index AMs, which are much simpler in their
building procedures, have simplistic reporting only, but that seems
sufficient, at least for non-concurrent builds.

The index-AM-agnostic part is fairly complete, providing insight into
the CONCURRENTLY wait phases as well as block-based progress during the
index validation table scan.  (The index validation index scan requires
patching each AM, which has not been included here.)

Reviewers: Rahila Syed, Pavan Deolasee, Tatsuro Yamada
Discussion: https://postgr.es/m/20181220220022.mg63bhk26zdpvmcj@alvherre.pgsql
37 files changed:
contrib/amcheck/verify_nbtree.c
contrib/bloom/blinsert.c
contrib/bloom/blutils.c
doc/src/sgml/indexam.sgml
doc/src/sgml/monitoring.sgml
src/backend/access/brin/brin.c
src/backend/access/gin/gininsert.c
src/backend/access/gin/ginutil.c
src/backend/access/gist/gist.c
src/backend/access/gist/gistbuild.c
src/backend/access/hash/hash.c
src/backend/access/hash/hashsort.c
src/backend/access/heap/heapam_handler.c
src/backend/access/nbtree/nbtree.c
src/backend/access/nbtree/nbtsort.c
src/backend/access/nbtree/nbtutils.c
src/backend/access/spgist/spginsert.c
src/backend/access/spgist/spgutils.c
src/backend/catalog/index.c
src/backend/catalog/system_views.sql
src/backend/commands/indexcmds.c
src/backend/storage/ipc/standby.c
src/backend/storage/lmgr/lmgr.c
src/backend/storage/lmgr/lock.c
src/backend/utils/adt/amutils.c
src/backend/utils/adt/pgstatfuncs.c
src/include/access/amapi.h
src/include/access/genam.h
src/include/access/nbtree.h
src/include/access/tableam.h
src/include/catalog/catversion.h
src/include/catalog/pg_proc.dat
src/include/commands/progress.h
src/include/pgstat.h
src/include/storage/lmgr.h
src/include/storage/lock.h
src/test/regress/expected/rules.out