Report progress of COPY commands
authorTomas Vondra <tomas.vondra@postgresql.org>
Wed, 6 Jan 2021 20:46:26 +0000 (21:46 +0100)
committerTomas Vondra <tomas.vondra@postgresql.org>
Wed, 6 Jan 2021 20:51:06 +0000 (21:51 +0100)
commit8a4f618e7ae3cb11b0b37d0f06f05c8ff905833f
tree97d073eea67cc7c8d0409a9f8ff1f493eb12cb7f
parentca8217c10138fa3ffe1e7d1def2484fd0eb78226
Report progress of COPY commands

This commit introduces a view pg_stat_progress_copy, reporting progress
of COPY commands.  This allows rough estimates how far a running COPY
progressed, with the caveat that the total number of bytes may not be
available in some cases (e.g. when the input comes from the client).

Author: Josef Šimánek
Reviewed-by: Fujii Masao, Bharath Rupireddy, Vignesh C, Matthias van de Meent
Discussion: https://postgr.es/m/CAFp7QwqMGEi4OyyaLEK9DR0+E+oK3UtA4bEjDVCa4bNkwUY2PQ@mail.gmail.com
Discussion: https://postgr.es/m/CAFp7Qwr6_FmRM6pCO0x_a0mymOfX_Gg+FEKet4XaTGSW=LitKQ@mail.gmail.com
doc/src/sgml/monitoring.sgml
src/backend/catalog/system_views.sql
src/backend/commands/copyfrom.c
src/backend/commands/copyfromparse.c
src/backend/commands/copyto.c
src/backend/utils/adt/pgstatfuncs.c
src/include/commands/copyfrom_internal.h
src/include/commands/progress.h
src/include/pgstat.h
src/test/regress/expected/rules.out