select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

SYSTEM CATALOGS / PROGRESS REPORTING

pg_stat_progress_copy

Read PG 18 manual ↗

Whenever COPY is running, the pg_stat_progress_copy view will contain one row for each backend that is currently running a COPY command.

Kind
Progress reporting
Columns in this snapshot
11
Definition source
English manual

Columns 11

ColumnTypeDescription / reference
pidintegerProcess ID of backend.
datidoidOID of the database to which this backend is connected.
datnamenameName of the database to which this backend is connected.
relidoidOID of the table on which the COPY command is executed. It is set to 0 if copying from a SELECT query.
commandtextThe command that is running: COPY FROM, or COPY TO.
typetextThe I/O 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).
bytes_processedbigintNumber of bytes already processed by COPY command.
bytes_totalbigintSize of source file for COPY FROM command in bytes. It is set to 0 if not available.
tuples_processedbigintNumber of tuples already processed by COPY command.
tuples_excludedbigintNumber of tuples not processed because they were excluded by the WHERE clause of the COPY command.
tuples_skippedbigintNumber of tuples skipped because they contain malformed data. This counter only advances when a value other than stop is specified to the ON_ERROR option.
Column history across versions
Version history 3
  1. PG 18 → 19changed
  2. PG 16 → 17changed
  3. PG 13 → 14added

Definition snapshot: english-manuals:8dab96f27695095c5dda51ebe6f… · English manual source