Updated on 2026-07-02 GMT+08:00

PGXC_QUERY_SPILL_ACTIVITY

The PGXC_QUERY_SPILL_ACTIVITY view displays detailed information about user queries and temporary files on each node. This view is supported only by clusters of version 9.1.1.300 or later.

Table 1 PGXC_QUERY_SPILL_ACTIVITY columns

Name

Type

Description

coorname

text

Name of the CN in the current cluster

datname

name

Name of the database that the user session connects to in the backend

usename

name

Name of the user logging in to the backend

pid

bigint

ID of the backend thread

application_name

text

Name of the application connected to the backend

client_addr

inet

IP address of the client connected to the backend. If this column is null, it indicates either that the client is connected via a Unix socket on the server machine or that this is an internal process such as autovacuum.

xact_start

timestamp with time zone

Time when current transaction was started. If no transaction is active, the value is null. If the current query is the first transaction, this column is the same as the query_start column.

query_start

timestamp with time zone

Time when the currently active query was started. If the value of state is not active, this column shows the start time of the previous query.

state

text

Overall state of the backend. Its value can be:

  • active: The backend is executing a query.
  • idle: The backend is waiting for a new client command.
  • idle in transaction: The backend is in a transaction, but there is no statement being executed in the transaction.
  • idle in transaction (aborted): The backend is in a transaction, but there are statements failed in the transaction.
  • fastpath function call: The backend is executing a fast-path function.
  • disabled: This state is reported if track_activities is disabled in this backend.
    NOTE:

    Only system administrators can view the session status of their accounts. The state information of other accounts is empty.

resource_pool

name

Resource pool used by the user

query_id

bigint

ID of the query statement

file_count

bigint

Number of temporary files

file_size

bigint

Size of temporary files

nodename

name

Node name

modification

timestamp with time zone

File modification time

query

text

Latest query of this backend. If the state is active, this column shows the executing query. In all other states, it shows the last query that was executed.