我有一个 PostgreSQL 9.1 热备用服务器。WAL 文件最终占据了整个 HD,所以我最终删除了所有 WAP 文件。我想如何恢复服务器所以我跑了:
/usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data
问题是服务器永远不会完全启动。我看到这之后是不停丢失的 WAL 文件日志输出:
server starting
sh-4.1$ LOG: database system was shut down in recovery at 2013-02-10 03:17:06 UTC
LOG: entering standby mode
cp: cannot stat `/usr/local/pgsql/wals/0000000100000035000000A4': No such file or directory
LOG: redo starts at 35/A4943928
LOG: consistent recovery state reached at 35/A4AE8EB8
LOG: database system is ready to accept read only connections
LOG: invalid record length at 35/A4AE8EB8
cp: cannot stat `/usr/local/pgsql/wals/0000000100000035000000A4': No such file or directory
LOG: streaming replication successfully connected to primary
FATAL: could not receive data from WAL stream: FATAL: requested WAL segment 0000000100000035000000A4 has already been removed
我怎样才能让服务器回来?