mirror of
https://github.com/postgres/postgres.git
synced 2025-10-22 14:32:25 +03:00
Add support for more progress reporting in COPY
The command (TO or FROM), its type (file, pipe, program or callback), and the number of tuples excluded by a WHERE clause in COPY FROM are added to the progress reporting already available. The column "lines_processed" is renamed to "tuples_processed" to disambiguate the meaning of this column in the cases of CSV and BINARY COPY and to be more consistent with the other catalog progress views. Bump catalog version, again. Author: Matthias van de Meent Reviewed-by: Michael Paquier, Justin Pryzby, Bharath Rupireddy, Josef Šimánek, Tomas Vondra Discussion: https://postgr.es/m/CAEze2WiOcgdH4aQA8NtZq-4dgvnJzp8PohdeKchPkhMY-jWZXA@mail.gmail.com
This commit is contained in:
@@ -133,9 +133,22 @@
|
||||
#define PROGRESS_BASEBACKUP_PHASE_WAIT_WAL_ARCHIVE 4
|
||||
#define PROGRESS_BASEBACKUP_PHASE_TRANSFER_WAL 5
|
||||
|
||||
/* Commands of PROGRESS_COPY */
|
||||
/* Progress parameters for PROGRESS_COPY */
|
||||
#define PROGRESS_COPY_BYTES_PROCESSED 0
|
||||
#define PROGRESS_COPY_BYTES_TOTAL 1
|
||||
#define PROGRESS_COPY_LINES_PROCESSED 2
|
||||
#define PROGRESS_COPY_TUPLES_PROCESSED 2
|
||||
#define PROGRESS_COPY_TUPLES_EXCLUDED 3
|
||||
#define PROGRESS_COPY_COMMAND 4
|
||||
#define PROGRESS_COPY_TYPE 5
|
||||
|
||||
/* Commands of COPY (as advertised via PROGRESS_COPY_COMMAND) */
|
||||
#define PROGRESS_COPY_COMMAND_FROM 1
|
||||
#define PROGRESS_COPY_COMMAND_TO 2
|
||||
|
||||
/* Types of COPY commands (as advertised via PROGRESS_COPY_TYPE) */
|
||||
#define PROGRESS_COPY_TYPE_FILE 1
|
||||
#define PROGRESS_COPY_TYPE_PROGRAM 2
|
||||
#define PROGRESS_COPY_TYPE_PIPE 3
|
||||
#define PROGRESS_COPY_TYPE_CALLBACK 4
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user