↑↓ select↵ open⌫ change scopeOpen full search

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

Wiki / System Catalogs

pg_stat_progress_copy

Whenever COPY is running, the pg_stat_progress_copy view will contain one row for each backend that is currently running a COPY command. The table below describes the information that will be reported and provides information about how to interpret it.

English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

kind
progress
lang
en
measured attributes
true
metadata release
18.6
runtime columns
pid, datid, datname, relid, command, type, bytes_processed, bytes_total, tuples_processed, tuples_excluded, tuples_skipped
runtime verified
false
source
english-manual

Definition PG 18

Whenever COPY is running, the pg_stat_progress_copy view will contain one row for each backend that is currently running a COPY command. The table below describes the information that will be reported and provides information about how to interpret it.

Catalog columns

ColumnTypeNullabilityDescription
pidintegerNullableProcess ID of backend.
datidoidNullableOID of the database to which this backend is connected.
datnamenameNullableName of the database to which this backend is connected.
relidoidNullableOID of the table on which the COPY command is executed. It is set to 0 if copying from a SELECT query.
commandtextNullableThe command that is running: COPY FROM, or COPY TO.
typetextNullableThe 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_processedbigintNullableNumber of bytes already processed by COPY command.
bytes_totalbigintNullableSize of source file for COPY FROM command in bytes. It is set to 0 if not available.
tuples_processedbigintNullableNumber of tuples already processed by COPY command.
tuples_excludedbigintNullableNumber of tuples not processed because they were excluded by the WHERE clause of the COPY command.
tuples_skippedbigintNullableNumber 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.

Compare versions

Complete source facts

documentation revision

{"inputs":[{"file":"progress-reporting.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"4a6cdd8228f2d858318f2056687ac4e2467e2c58e5fed10bdb583ba8eb66fec5","version":"18.7"},{"file":"progress-reporting.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"0ab33caa1959f857312f1a866b2b0f0afde18c3fd85db5d957eefa1b7a2e441f","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"}

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · catalog-bilingual-repair:8c9153a121bf2543852100390f05eb21ceeaadcb961f2bddc466cc71b7bacc58

Text language: en · catalog-bilingual-repair:8c9153a121bf2543852100390f05eb21ceeaadcb961f2bddc466cc71b7bacc58