gp_workfile_usage_per_query
The gp_toolkit.gp_workfile_usage_per_query view contains one row for each query using disk space for workfiles on a segment at the current time.
This view is accessible to all users.
However, non‑superusers only see information for the databases that they have permission to access.
| Column | Type | Description |
|---|---|---|
datname |
name |
Database name |
pid |
integer |
Process ID of the server process |
sess_id |
integer |
Session ID |
command_cnt |
integer |
Command ID of the query |
usename |
name |
Role name |
query |
text |
Current query the process is running |
segid |
integer |
Segment ID |
size |
numeric |
The size of the workfile in bytes |
numfiles |
bigint |
The number of files created |