网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

PostgreSQL中怎么使用snapshot操作接口函数

本篇内容介绍了“PostgreSQL中怎么使用snapshot操作接口函数”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

韶山ssl适用于网站、小程序/APP、API接口等需要进行数据传输应用场景,ssl证书未来市场广阔!成为创新互联的ssl证书销售渠道,可以享受市场价格4-6折优惠!如果有意向欢迎电话联系或者加微信:028-86922220(备注:SSL证书合作)期待与您的合作!

snapshot 操作接口函数

1、创建快照,当BLOCK发生变更时,变更之前的BLOCK(旧版本),写入*.snapmap.SNAP_ID file文件中。直到snapshot被删除。

/*  
 * Create new snapshot. Starting from this moment Postgres will store original copies of all updated pages.  
 * Them will be stored in shanpshot file (*.snap.SNAP_ID and addressed through *.snapmap.SNAP_ID file) until  
 * snapshot is deleted by sfs_remove_snapshot function or new snapshot is created.  
 */  
extern SnapshotId sfs_make_snapshot(void);

2、删除snapshot.

/*  
 * Remove snapshot with all it's files  
 */  
extern void sfs_remove_snapshot(SnapshotId sid);

3、将数据库恢复到指定snapshot.

/*  
 * Reset database state to the paritcular snapshot.   
 * It will be not possible any more to recover to any of more recent snashots or to the most recent database state.  
 */  
extern void sfs_recover_to_snapshot(SnapshotId sid);

4、查看数据库过去的某个状态。(并不是恢复到过去的状态)

/*  
 * Temporary switch instance to the particular snashot. It will be possible to return back to the most recent database state or to switch to any other snapshot  
 */  
extern void sfs_switch_to_snapshot(SnapshotId sid);

5、仅仅将当前的BACKEND PID,切换到数据库过去某个SNAPSHOT ID的状态,而不是将所有BACKEND切换到过去的某个状态。

/*  
 * Set snapshot for backend,  unlike sfs_switch_to_snapshot function, it switchces snapshot for the current backend and not for all server instance.  
 */  
extern void sfs_set_backend_snapshot(SnapshotId sid);

这些接口与ZFS的SNAPSHOT功能非常类似。

“PostgreSQL中怎么使用snapshot操作接口函数”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注创新互联网站,小编将为大家输出更多高质量的实用文章!


分享名称:PostgreSQL中怎么使用snapshot操作接口函数
文章路径:http://bjjierui.cn/article/psigjs.html

其他资讯