1
후 WAL를 재생, 내 postgres.conf 파일에 계속 보관을 설정 한 : 성공적인 백업 및 복구 후PostgreSQL의 9.2 보관 마지막으로 PostgreSQL의 9.2 공식 문서에 따라 복구
wal_level = archive
archive_mode = on
archive_command = 'test ! -f /.../archive/%f && cp %p /.../archive/%f'
, 아카이브 명령을 할 때 실패 PostgreSQL은 마지막으로 재생 된 WAL 파일을 보관하려고하기 때문에 데이터베이스가 시작되고 분명히 이미 아카이브되었습니다. 내 recovery.conf 파일은 다음과 같다 :
restore_command = 'cp /.../archive/%f "%p"'
recovery_target_time = '2013-07-02 15:20:12'
그리고 이것은 내가 데이터베이스 시작하려고하면 내가지고있어 오류입니다 :
LOG: database system was interrupted; last known up at 2013-07-02 14:53:37 CEST
LOG: creating missing WAL directory "pg_xlog/archive_status"
LOG: starting point-in-time recovery to 2013-07-02 15:20:12+02
LOG: restored log file "000000010000000000000002" from archive
LOG: redo starts at 0/2000020
LOG: consistent recovery state reached at 0/20023D0
LOG: restored log file "000000010000000000000003" from archive
LOG: recovery stopping before commit of transaction 4063, time 2013-07-02 15:20:12.211559+02
LOG: redo done at 0/306D8B8
LOG: last completed transaction was at log time 2013-07-02 15:20:11.189978+02
cp: cannot stat `/.../archive/00000002.history': No such file or directory
LOG: selected new timeline ID: 2
cp: cannot stat `/.../archive/00000001.history': No such file or directory
LOG: archive recovery complete
LOG: autovacuum launcher started
LOG: database system is ready to accept connections
LOG: archive command failed with exit code 1
DETAIL: The failed archive command was: test ! -f /.../archive/000000010000000000000003 && cp pg_xlog/000000010000000000000003 /.../archive/000000010000000000000003
LOG: archive command failed with exit code 1
DETAIL: The failed archive command was: test ! -f /.../archive/000000010000000000000003 && cp pg_xlog/000000010000000000000003 /.../archive/000000010000000000000003
LOG: archive command failed with exit code 1
DETAIL: The failed archive command was: test ! -f /.../archive/000000010000000000000003 && cp pg_xlog/000000010000000000000003 /.../archive/000000010000000000000003
WARNING: transaction log file "000000010000000000000003" could not be archived: too many failures
이 예상되는 동작입니다을? 복구 후 마지막으로 재생 된 WAL 파일을 보관해야합니까? 그렇다면 파일이 이미 아카이브 된 경우 (문서에 언급 된대로) 아카이브 명령이 실패하지 않아야합니다.