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
| Name | Type | Description |
|---|---|---|
csn_snapshots_imported | bigint | Total number of imported CSN snapshots |
csn_total_import_delay | interval | Total duration of all delays in importing CSN snapshots, in microseconds |
csn_max_shift | bigint | Maximum registered snapshot CSN shift that caused a delay |
global_oldest_csn | bigint | CSN of the oldest transaction in the cluster |
global_oldest_xid | xid | XID of the oldest transaction in the cluster |
global_oldest_rgid | integer | Number of the replication group with the oldest transaction in the cluster |
local_oldest_csn | bigint | CSN of the oldest transaction on the current node |
local_oldest_xid | xid | XID of the oldest transaction on the current node |
CSNXidMap_head_csn | bigint | Most recent CSN in the CSNSnapshotXidMap
|
CSNXidMap_head_xid | xid | XID corresponding to the most recent CSN in the
CSNSnapshotXidMap
|
CSNXidMap_tail_csn | bigint | Oldest CSN in the CSNSnapshotXidMap
|
CSNXidMap_tail_xid | xid | XID corresponding to the oldest CSN in the
CSNSnapshotXidMap
|
stats_reset | timestamp with time zone | Time 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.
Shardman functionality related to CSN snapshots is work in progress. So anticipate changes to the corresponding views in future releases.