生产环境postgresql9.6流复制主从同步之wal被移除主备不一致

背景/问题

postgresql数据库集群的模式是主从异步同步,热备,基于流复制

2小时内往数据库写入1千万数据,导致数据库报错:

< 2021-01-27 19:02:21.536 CST >FATAL: could not receive data from WAL stream: ERROR: requested WAL segment 000000010000368600000080 has already been removed

< 2021-01-27 19:02:22.998 CST >LOG: invalid magic number 0000 in log segment 000000010000368600000080, offset 5300224
< 2021-01-27 19:02:33.768 CST >LOG: started streaming WAL from primary at 3686/80000000 on timeline 1
< 2021-01-27 19:02:33.768 CST >FATAL: could not receive data from WAL stream: ERROR: requested WAL segment 000000010000368600000080 has already been removed

< 2021-01-27 19:02:38.015 CST >LOG: started streaming WAL from primary at 3686/80000000 on timeline 1
< 2021-01-27 19:02:38.015 CST >FATAL: could not receive data from WAL stream: ERROR: requested WAL segment 000000010000368600000080 has al

你可能感兴趣的:(postgresql,postgresql)