Snapshot 管理函数

以下函数都需要是 superuser 权限

  • create_rdr_snapshot,调用函数,唤醒采集快照线程,执行采集快照。
--发送创建快照请求,唤醒采集快照线程
select create_rdr_snapshot();
  • clean_rdr_snapshot_full(dbid bigint),调用函数,可以清理全部快照采集数据。
--清理 数据库ID 为 1 的全部运行时诊断快照
select clean_rdr_snapshot_full(1);
  • clean_rdr_snapshot_range(begin snapid,end snapid,dbid bigint),调用函数清理指定范围内的快照采集数据。
--清理 数据库ID 为 1 的,snapshot_id 1 到 2 之间的快照
select clean_rdr_snapshot_range(1,2,1);