Skip to main content
info

This is a preview feature. Preview features may be operationally incomplete and may offer limited backward compatibility.

Monitoring active server connections

The md_active_server_connections table function can be used to list all server-side connections that have active transactions.

Syntax

FROM md_active_server_connections();

This returns a list of active server connections, with the following information:

column_namecolumn_typedescription
client_duckdb_idUUIDUnique identifier for the client DuckDB instance that initiated the connection
client_connection_idUUIDUnique identifier for the client DuckDB connection that initiated the connection
client_transaction_idUBIGINTIdentifier for the transaction within the current connection
server_transaction_stageVARCHARStage the server-side transaction is in
server_transaction_elapsed_timeINTERVALHow long the server-side transaction has been in the current stage
client_query_idUBIGINTIdentifier for the query within the current transaction
client_queryVARCHARQuery string (possibly truncated)
server_query_elapsed_timeINTERVALHow long the query has been running on the server-side
server_query_progressDOUBLEProgress information (value between 0.0 and 1.0)
server_interrupt_elapsed_timeINTERVALHow long the connection has been interrupted
server_interrupt_reasonVARCHARWhy the connection was interrupted