我试图在
postgresql 9.0上运行流复制.我按照链接中提到的步骤操作:
http://brandonkonkle.com/blog/2010/oct/20/postgres-9-streaming-replication-and-django-balanc/
当我尝试在postgresql上执行归档命令时,我收到警告,要求我无休止地等待.我按以下顺序执行命令:
SELECT pg_start_backup('base_backup'); cd /var/lib/postgresql/9.0/ sudo tar -cjf ~/postgres-data.tar.bz2 main SELECT pg_stop_backup();
为此,我得到以下输出:
NOTICE: pg_stop_backup cleanup done,waiting for required WAL segments to be archived WARNING: pg_stop_backup still waiting for all required WAL segments to be archived (60 seconds elapsed) HINT: Check that your archive_command is executing properly. pg_stop_backup can be cancelled safely,but the database backup will not be usable without all the WAL segments. WARNING: pg_stop_backup still waiting for all required WAL segments to be archived (120 seconds elapsed) HINT: Check that your archive_command is executing properly. pg_stop_backup can be cancelled safely,but the database backup will not be usable without all the WAL segments.
这继续保持下去,警告永远不会结束.如果有人遇到这个问题,请告诉我.
您已按照指定的链接中所述设置了archive_command?它实际上是否正确地将xlog文件复制到安全位置?服务器的输出表明它不是,而且积压正在pg_xlog中构建
我似乎记得你实际上并不需要在服务器上启用存档以将其用作副本中的主服务器.您需要将wal_level设置为hot_standby.有了这个设置,您的副本就可以连接到主服务器以独立于传统的xlog存档过程流式传输xlog记录.所以尝试设置archive_mode = off.
编辑:更详细地阅读链接,您需要设置archive_mode来创建基本备份,这是有道理的.因此,要么修复存档命令,以便正确执行基本备份,要么在服务器停止时进行基本备份.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。