From 9d2d45700928d49212fb7ed140feeaebe3a6014f Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Tue, 9 Mar 2021 14:21:03 +0900 Subject: Add support for more progress reporting in COPY MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- doc/src/sgml/monitoring.sgml | 45 +++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 53692c0020b..51f73384041 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -6531,8 +6531,33 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, relid oid - OID of the table on which the COPY command is executed. - It is set to 0 if copying from a SELECT query. + OID of the table on which the COPY command is + executed. It is set to 0 if copying from a + SELECT query. + + + + + + command text + + + The command that is running: COPY FROM, or + COPY TO. + + + + + + type text + + + The io type that the data is read from or written to: + FILE, PROGRAM, + PIPE (for COPY FROM STDIN and + COPY TO STDOUT), or CALLBACK + (used for example during the initial table synchronization in + logical replication). @@ -6551,16 +6576,26 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid, Size of source file for COPY FROM command in bytes. - It is set to 0 if not available. + It is set to 0 if not available. + + + + + + tuples_processed bigint + + + Number of tuples already processed by COPY command. - lines_processed bigint + tuples_excluded bigint - Number of lines already processed by COPY command. + Number of tuples not processed because they were excluded by the + WHERE clause of the COPY command. -- cgit v1.2.3