내 devel 데이터베이스 노드에서 큰 데이터베이스 (사용자 정의 형식으로 거의 32Go)를 복원하려고하면 약간의 문제가 발생합니다. 섬기는 사람). PostgreSQL - 매우 큰 데이터베이스를 복원하는 방법
내 데이터베이스 덤프
는 유사한 명령으로 생성됩니다 여기pg_restore -F custom -j 5 -d myDB /backup/myDB-20130331.pg91
그러나, 복원 명령이 실패 할 때마다 :
pg_dump -F custom -b myDB -Z 9 > /backup/myDB-`date +%y%m%d`.pg91
그리고 내가 그것을 복원 할 때, 나는 다음과 같은 명령을 사용하여
pg_restore: [archiver (db)] error returned by PQputCopyData: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
pg_restore: [archiver] worker process failed: exit code 1
pg_restore: [archiver (db)] error returned by PQputCopyData: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
pg_restore: [archiver (db)] error returned by PQputCopyData: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
pg_restore: [archiver (db)] error returned by PQputCopyData: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
그리고 내 postgresql 로그를 확인할 때 다음을 읽을 수 있습니다 :
HINT: In a moment you should be able to reconnect to the database and repeat your command.
LOG: all server processes terminated; reinitializing
LOG: database system was interrupted; last known up at 2013-04-02 11:41:48 UTC
LOG: database system was not properly shut down; automatic recovery in progress
LOG: redo starts at 86/26F302B0
LOG: unexpected pageaddr 85/E3F52000 in log file 134, segment 38, offset 16064512
LOG: redo done at 86/26F51FC0
LOG: last completed transaction was at log time 2013-04-02 11:50:47.663599+00
LOG: database system is ready to accept connections
LOG: autovacuum launcher started
내 복원 때문에 내 postgresql 서버가 "다시 시작됩니다"라는 것이 이상합니다. 작업의 수를 최소화하려고 시도하지만 (-j 5
옵션) 여전히 동일한 문제가 발생합니다. 그러나 더 나은 사양의 노드에서이 데이터베이스를 복원하는 데 문제가 없습니다. 잘 모르겠지만 내 인덱스의 업데이트 (그 중 하나가 실제로 너무 큽니다)가이 문제를 이해하는 데 도움이 될 수 있습니까?
그래서 몇 가지 질문이 있습니다. 정말 큰 데이터베이스를 복원하는 더 좋은 방법이 있습니까? 내 pg_restore 명령에서 뭔가를 놓치고 있습니까? 내 devel 서버의 설정이 너무 낮을 수 있습니까?
모든 단서는 크게 감사하겠습니다. 감사합니다.
ENV : PostgreSQL의 9.1 큰 일 이런 종류의
백엔드 크래시처럼 보이지만 실제로 말하거나 이유를 알기 위해서는 더 많은 로그를 표시해야합니다. –
안녕하세요 @CraigRinger, 무슨 일이 일어나는지 이해하기 위해 로그를 좀 더 장황하게 만들 것을 제안합니까? 다시 시도해보고 더 많은 정보를 얻으려고합니다. – Labynocle
작업 수가 5에서 2로 다시 줄어들 수도 있습니다. 개발에 더 오래 걸리 겠지만 개발 노드에서는 덜 까다로울 수 있습니다. – thisfeller