information_schema.transactions view to return information about currently running and recently finished transactions. The view contains one row for each transaction. You can use a SELECT query to return this information as shown in the example below.
To view transaction information, you must have the necessary privileges on the database to access monitoring views.
Users can only monitor transactions that they initiated.
Usage Notes
⚠️ The view scans a maximum of the latest 1000 transactions. To ensure a precise and efficient query, it’s highly recommended to use an explicit predicate in aWHERE clause to filter the results. For example, to find only transaction started after a given begin_lsn: