diff options
| author | Tomas Vondra | 2021-01-06 20:46:26 +0000 |
|---|---|---|
| committer | Tomas Vondra | 2021-01-06 20:51:06 +0000 |
| commit | 8a4f618e7ae3cb11b0b37d0f06f05c8ff905833f (patch) | |
| tree | 97d073eea67cc7c8d0409a9f8ff1f493eb12cb7f /src/include/commands/progress.h | |
| parent | ca8217c10138fa3ffe1e7d1def2484fd0eb78226 (diff) | |
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
Diffstat (limited to 'src/include/commands/progress.h')
| -rw-r--r-- | src/include/commands/progress.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/commands/progress.h b/src/include/commands/progress.h index 49a158aabbf..95ec5d02e9c 100644 --- a/src/include/commands/progress.h +++ b/src/include/commands/progress.h @@ -133,4 +133,9 @@ #define PROGRESS_BASEBACKUP_PHASE_WAIT_WAL_ARCHIVE 4 #define PROGRESS_BASEBACKUP_PHASE_TRANSFER_WAL 5 +/* Commands of PROGRESS_COPY */ +#define PROGRESS_COPY_BYTES_PROCESSED 0 +#define PROGRESS_COPY_BYTES_TOTAL 1 +#define PROGRESS_COPY_LINES_PROCESSED 2 + #endif |
