]> granicus.if.org Git - postgresql/commit
Add a generic command progress reporting facility.
authorRobert Haas <rhaas@postgresql.org>
Wed, 9 Mar 2016 17:08:58 +0000 (12:08 -0500)
committerRobert Haas <rhaas@postgresql.org>
Wed, 9 Mar 2016 17:08:58 +0000 (12:08 -0500)
commitb6fb6471f6afaf649e52f38269fd8c5c60647669
tree18c0f9e24c9378625f994cdf24d193fadcd42349
parent8776c15c85322612b9bf79daf50f74be71c12e05
Add a generic command progress reporting facility.

Using this facility, any utility command can report the target relation
upon which it is operating, if there is one, and up to 10 64-bit
counters; the intent of this is that users should be able to figure out
what a utility command is doing without having to resort to ugly hacks
like attaching strace to a backend.

As a demonstration, this adds very crude reporting to lazy vacuum; we
just report the target relation and nothing else.  A forthcoming patch
will make VACUUM report a bunch of additional data that will make this
much more interesting.  But this gets the basic framework in place.

Vinayak Pokale, Rahila Syed, Amit Langote, Robert Haas, reviewed by
Kyotaro Horiguchi, Jim Nasby, Thom Brown, Masahiko Sawada, Fujii Masao,
and Masanori Oyama.
src/backend/access/transam/xact.c
src/backend/commands/vacuumlazy.c
src/backend/postmaster/pgstat.c
src/backend/utils/adt/pgstatfuncs.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h
src/include/pgstat.h