postgresql备份还原部分内容笔记

使用pg_basebackup做备份
restore_command = 'gunzip -c /var/lib/pgsql/archive/%f.gz > %p'
recovery_target_xid= 6710

restore_command = 'gunzip -c /var/lib/pgsql/archive/%f.gz > %p'
recovery_target_timeline = 'latest'

 

查看事件ID

select txid_current();

切换xlog
select pg_switch_xlog();

posted @ 2022-07-16 18:45  Smile杰丶  阅读(35)  评论(0编辑  收藏  举报