我有两个运行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.
标题中提到的“不完整的启动数据包”错误可能是无关的,并且是由尝试从具有sslmode = prefer的客户端与非SSL感知服务器建立SSL连接引起的.
原文地址:https://www.jb51.cc/postgresql/192321.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。