即使数据库在几秒钟之前完全相同,pg_rewind也会尝试重绕1G

时间:2017-09-19 14:37:38

标签: postgresql

我想使用pg_rewind来改善恢复旧主人并将其转换为奴隶所需的时间。但是,即使新的主服务器和旧主服务器相隔几秒钟(几秒钟前复制停止),pg_rewind也认为它需要同步1293 MB。完成后,pg_rewind Postgres服务无法启动,我需要做rysnc来修复它。它是pg_rewind的已知错误还是我错过了什么。

2017-09-19 16:17:36: ++ ssh -T -o ConnectTimeout=5 postgres@172.18.255.5 '/usr/pgsql/bin/pg_rewind --progress  --source-server='\''port=5432 host=172.18.255.6'\'' --target-pgdata=/postgr$
2017-09-19 16:17:36: connected to server
2017-09-19 16:17:36: servers diverged at WAL position 1/88000000 on timeline 55
2017-09-19 16:17:36: rewinding from last common checkpoint at 1/871F3210 on timeline 55
2017-09-19 16:17:36: reading source file list
2017-09-19 16:17:36: reading target file list
2017-09-19 16:17:36: reading WAL in target
2017-09-19 16:17:36: need to copy 1293 MB (total source directory size is 1333 MB)
2017-09-19 16:17:48:       0/1324255 kB (0%) copied^M  28278/1324255 kB (2%) copied^M 142966/1324255 kB (10%) copied^M 257654/1324255 kB (19%) copied^M 372342/1324255 kB (28%) copied^M 487$
2017-09-19 16:17:48: creating backup label and updating control file
2017-09-19 16:17:48: syncing target data directory
2017-09-19 16:17:52: Done!

0 个答案:

没有答案