如何修复导致“不完整的启动数据包”日志消息尝试在Postgresql中
我有两个运行Ubuntu 13.04和PostgreSQL 9.2的云服务器.
我主要使用this blog post来帮助我进行设置.但是,要对从服务器执行初始数据库转储,我使用的是this other blog post中使用的pg_start_backup / pg_stop_backup策略.我已经阅读了文档和postgres wiki.我遇到了几个我能够解决的问题,但我无法通过这个可怜的“数据库启动”失败. 我不确定是否看到: cp: cannot stat /var/lib/postgresql/9.2/archive/00000001000000000000003A': No such file or directory 达到一致恢复状态后是正常还是出现问题的第一个迹象.我在数据库上进行的搜索正在启动,不完整的启动数据包告诉我正在向从服务器发送空TCP数据包.唯一知道奴隶的事就是主人,所以我不确定为什么要发送空包…… 有没有人使用过这个并且知道可能出现什么问题? postgres登录奴隶看起来像这样: 2013-08-26 13:01:38 CDT LOG: entering standby mode 2013-08-26 13:01:38 CDT LOG: restored log file "000000010000000000000039" from archive 2013-08-26 13:01:38 CDT LOG: incomplete startup packet 2013-08-26 13:01:39 CDT LOG: redo starts at 0/39000020 2013-08-26 13:01:39 CDT LOG: consistent recovery state reached at 0/390000E0 cp: cannot stat '/var/lib/postgresql/9.2/archive/00000001000000000000003A': No such file or directory 2013-08-26 13:01:39 CDT LOG: streaming replication successfully connected to primary 2013-08-26 13:01:39 CDT FATAL: the database system is starting up 2013-08-26 13:01:39 CDT FATAL: the database system is starting up 2013-08-26 13:01:40 CDT FATAL: the database system is starting up 2013-08-26 13:01:40 CDT FATAL: the database system is starting up 2013-08-26 13:01:41 CDT FATAL: the database system is starting up 2013-08-26 13:01:42 CDT FATAL: the database system is starting up 2013-08-26 13:01:42 CDT FATAL: the database system is starting up 2013-08-26 13:01:43 CDT FATAL: the database system is starting up 2013-08-26 13:01:43 CDT FATAL: the database system is starting up 2013-08-26 13:01:44 CDT FATAL: the database system is starting up 2013-08-26 13:01:44 CDT FATAL: the database system is starting up 2013-08-26 13:01:44 CDT LOG: incomplete startup packet 2013-08-26 13:03:27 CDT FATAL: the database system is starting up 2013-08-26 13:03:27 CDT FATAL: the database system is starting up 2013-08-26 13:03:30 CDT FATAL: the database system is starting up 2013-08-26 13:03:30 CDT FATAL: the database system is starting up 谢谢!
您无法在pg_stop_backup之后复制最后一个WAL存档.如果要使用此方法,则需要设置WAL归档或手动复制WAL.
在9.2及更高版本中,使用pg_basebackup –xlog-method = stream进行一次性复制要容易得多.这会通过复制协议复制事务日志,以及自己的基本备份,并自动处理pg_start_backup和pg_stop_backup. 见the 标题中提到的“不完整的启动数据包”错误可能是无关的,并且是由尝试从具有sslmode = prefer的客户端与非SSL感知服务器建立SSL连接引起的. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |