F.26. lt_stat_activity

F.26.1. Concepts
F.26.2. Prerequisites
F.26.3. Creating Extensions

This extension for LightDB add lt_stat_activity view.

F.26.1. Concepts

This extension provides the lt_stat_activity view, which contains all pg_stat_activity fields and adds the query_id field, which is consistent with the query_id in pg_stat_statements. When waiting events occur, lt_stat_activity and pg_stat_statements can be used to analyze together by query_id.

F.26.2. Prerequisites

lt_stat_activity extension depends on extension lt_stat_statements.

F.26.3. Creating Extensions

you must add lt_stat_activity in shared_preload_libraries, and restart server is needed after modify shared_preload_libraries.

 
# lightdb.conf
shared_preload_libraries = 'lt_stat_statements,lt_stat_activity'

lightdb@postgres=# CREATE EXTENSION lt_stat_statements;
lightdb@postgres=# CREATE EXTENSION lt_stat_activity;

You can define extension parameters in lightdb.conf.

lt_stat_activity.track = top - default, track top level query.

lt_stat_activity.track = none - query_id field in lt_stat_activity is always null.