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
| Column | Type | Nullability | Description |
|---|---|---|---|
| pid | integer | Nullable | Process ID of backend. |
| datid | oid | Nullable | OID of the database to which this backend is connected. |
| datname | name | Nullable | Name of the database to which this backend is connected. |
| relid | oid | Nullable | OID of the table on which the COPY command is executed. It is set to 0 if copying from a SELECT query. |
| command | text | Nullable | The command that is running: COPY FROM, or COPY TO. |
| type | text | Nullable | The 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_processed | bigint | Nullable | Number of bytes already processed by COPY command. |
| bytes_total | bigint | Nullable | Size of source file for COPY FROM command in bytes. It is set to 0 if not available. |
| tuples_processed | bigint | Nullable | Number of tuples already processed by COPY command. |
| tuples_excluded | bigint | Nullable | Number of tuples not processed because they were excluded by the WHERE clause of the COPY command. |
| tuples_skipped | bigint | Nullable | Number 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