gpt4 book ai didi

postgresql - Postgres 复制 : Incomplete Startup Packet

转载 作者:行者123 更新时间:2023-11-29 11:28:57 24 4
gpt4 key购买 nike

我最近在单个主/从之间配置了 PostgreSQL 9.3 热备份复制。

我今天再次检查了我的备用服务器,看起来它无法在重启时完成并退出恢复模式:

2014-03-25 22:36:07 UTC LOG:  entering standby mode
2014-03-25 22:36:07 UTC LOG: incomplete startup packet
2014-03-25 22:36:07 UTC LOG: redo starts at 7/E1091840
2014-03-25 22:36:07 UTC LOG: consistent recovery state reached at 7/E10929C8
2014-03-25 22:36:07 UTC LOG: record with zero length at 7/E10929C8
2014-03-25 22:36:07 UTC LOG: started streaming WAL from primary at 7/E1000000 on timeline 1
2014-03-25 22:36:08 UTC FATAL: the database system is starting up
2014-03-25 22:36:08 UTC FATAL: the database system is starting up
2014-03-25 22:36:09 UTC FATAL: the database system is starting up
... more ...
2014-03-25 22:36:13 UTC LOG: incomplete startup packet

我试过手动将 WAL 记录从主服务器复制到从服务器,但我得到了同样的错误,所以我想知道是不是主服务器上的 WAL 记录有问题?

最佳答案

我解决了同样的问题

 psql -c "select pg_start_backup('initial_backup');"
rsync -cva --inplace --exclude=*pg_xlog* /var/lib/postgresql/9.1/main/ slave_IP_address:/var/lib/postgresql/9.1/main/
psql -c "select pg_stop_backup();"

here is a good tutorial !!

关于postgresql - Postgres 复制 : Incomplete Startup Packet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22648029/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com