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();