6.3. Views

6.3.1. shardman.pg_stat_csn

6.3.1. shardman.pg_stat_csn

The shardman.pg_stat_csn view will have one row showing statistics on delays that take place during import of CSN snapshots. These delays occur because system clocks on Shardman cluster nodes may be out of sync. The delays negatively impact the performance by increasing the query latency. The shardman.pg_stat_csn view allows tracking these delays. The view data is based on The Statistics Collector. The columns of the view are shown in Table 6.1.

Table 6.1. shardman.pg_stat_csn Columns

NameTypeDescription
csn_snapshots_importedbigintTotal number of imported CSN snapshots
csn_total_import_delayintervalTotal duration of all delays in importing CSN snapshots, in microseconds
csn_max_shiftbigintMaximum registered snapshot CSN shift that caused a delay
global_oldest_csnbigintCSN of the oldest transaction in the cluster
global_oldest_xidxidXID of the oldest transaction in the cluster
global_oldest_rgidintegerNumber of the replication group with the oldest transaction in the cluster
local_oldest_csnbigintCSN of the oldest transaction on the current node
local_oldest_xidxidXID of the oldest transaction on the current node
CSNXidMap_head_csnbigintMost recent CSN in the CSNSnapshotXidMap
CSNXidMap_head_xidxidXID corresponding to the most recent CSN in the CSNSnapshotXidMap
CSNXidMap_tail_csnbigintOldest CSN in the CSNSnapshotXidMap
CSNXidMap_tail_xidxidXID corresponding to the oldest CSN in the CSNSnapshotXidMap
stats_resettimestamp with time zoneTime at which these statistics were last reset

To reset CSN-related statistics, call the pg_stat_reset_shared function with the only text argument equal to csn.

Note

Shardman functionality related to CSN snapshots is work in progress. So anticipate changes to the corresponding views in future releases.