Hmm, looks like a very bare-bones support for hash indexes does not
require a lot of code, and gives a clear picture (you can sit all night
watching the numbers go up, instead of biting your fingernails wondering
if it'll be completed by dawn.) This part isn't 100% done -- it we
would better to have ambuildphasename support.
(I'm a bit confused about phase 5 not reporting anything for hash
indexes in CIC, though. That's part is supposed to be AM agnostic.)
I think it was a mistake to define the progress constants in one header
file commands/progress.h and the associated functions in pgstat.h. I
think it would be better to move the function decls to
commands/progress.h.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services