Updated on 2025-05-29 GMT+08:00

PG_OS_THREADS

PG_OS_THREADS provides status information about all the threads under the current node. In the multi-tenancy scenario, global information is returned if this view is accessed in a non-PDB, and information about a PDB is returned if this view is accessed in the PDB.

Table 1 PG_OS_THREADS columns

Name

Type

Description

node_name

text

Current node name

pid

bigint

PID of the thread running under the current node process

lwpid

integer

Lightweight thread ID corresponding to the PID

thread_name

text

Thread name corresponding to the PID

creation_time

timestamp with time zone

Thread creation time corresponding to the PID

dbid

oid

ID of the database to which a thread belongs.