database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
ㆍPostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
PostgreSQL Q&A 6640 게시물 읽기
No. 6640
pgsql 개작살 ㅠ_ㅠ;
작성자
신기배(소타)
작성일
2006-04-25 17:39
조회수
6,155

오늘 있었던 일 입니다. 상기님의 도움을 받아 해결해 보려고 노력했는데 결국 시간에 쫓기기도 해서 이 DB 클러스터는 포기하고 새로 initdb해서 덤프 했던걸 리스토어 하고 있습니다.. ㅠ_ㅠ;;;


  1. 설정 상태
    • fsync=off
    • checkpoint_segments = 16
    • checkpoint_timeout = 3600
    • checkpoint_warning = 0
    • work_mem = 2048
    • maintenance_work_mem = 65536
    • wal_buffers =256
    • autovacuum = off
  2. 시스템
    • CPU: P4 3Ghz 싱글(2개로 잡힘)
    • MEM: 512MB
    • pgsql: 8.1.3
  3. 상황
    1. BEGIN;
    2. 약 58만개의 row 삭제
    3. 새로운 제약조건 생성
      ALTER TABLE "working"."tb_object"
        ADD CONSTRAINT "tb_object_mid" FOREIGN KEY ("mid")
        REFERENCES "public"."tb_member"("mid")
        ON DELETE CASCADE
        ON UPDATE CASCADE
        DEFERRABLE
        INITIALLY DEFERRED;
      
    4. COMMIT;
    5. VACUUM FULL;
    6. EXPLAIN SELECT 로 인덱스 사용 확인
    7. VACUUM ANALYZE VRBOSE;
    8. 시스템 다운
    9. 리부팅
    10. pgsql 시작 -> startup 프로세스가 한참 작업하다가 죽어버림(시그널 6)
      [postgres@onpamdb01 /]$ WARNING:  autovacuum not started because of misconfiguration
      HINT:  Enable options "stats_start_collector" and "stats_row_level".
      LOG:  database system was interrupted while in recovery at 2006-04-25 16:34:19 KST
      HINT:  This probably means that some data is corrupted and you will have to use the last backup for recovery.
      LOG:  checkpoint record is at 2/4112B198
      LOG:  redo record is at 2/4110001C; undo record is at 0/0; shutdown FALSE
      LOG:  next transaction ID: 1314926; next OID: 759566
      LOG:  next MultiXactId: 1; next MultiXactOffset: 0
      LOG:  database system was not properly shut down; automatic recovery in progress
      LOG:  redo starts at 2/4110001C
      PANIC:  block 13 unfound
      LOG:  startup process (PID 2788) was terminated by signal 6
      LOG:  aborting startup due to startup process failure
      
    11. fsck -> 결과 정상
    12. 상기님의 도움으로 pg_resetxlog 수행
    13. 역시 시작 안됨
    14. pg_resetxlog -f 로 강제로 리셋 수행
    15. 시작 됨
    16. 문제의 DB로 접근 -> 에러나며 접근 안됨(psql과 vacuumdb명령)
      FATAL:  index "pg_class_oid_index" is not a btree
      psql: FATAL:  index "pg_class_oid_index" is not a btree
      
    17. base/1 내의 해당 인덱스의 OID를 찾아서 복사
    18. pg_ctl restart -> 다시 접근 -> 다른 인덱스가 문제됨
    19. 문제되는 인덱스를 모두 찾아 template1에서 복사해줌
    20. 새로운 에러와 함께 접근시 아래와 같은 프로세스 상태가 되며 서버가 재시작됨
      postgres  3091  1.7  1.2 32004 6372 pts/0    S    17:12   0:00 /usr/local/pgsql8.1.3/bin/postmaster
      postgres  3099  0.0  1.2 32004 6412 pts/0    S    17:12   0:00  \_ postgres: writer process
      
      [postgres@onpamdb01 pg_xlog]$ vacuumdb MagicHome
      LOG:  server process (PID 3141) was terminated by signal 11
      LOG:  terminating any other active server processes
      vacuumdb: could not connect to database MagicHome: server closed the connection unexpectedly
              This probably means the server terminated abnormally
              before or while processing the request.
      LOG:  all server processes terminated; reinitializing
      [postgres@onpamdb01 pg_xlog]$ LOG:  database system was interrupted at 2006-04-25 17:13:59 KST
      LOG:  checkpoint record is at 2/590000E8
      LOG:  redo record is at 2/590000E8; undo record is at 0/0; shutdown TRUE
      LOG:  next transaction ID: 1316400; next OID: 759566
      LOG:  next MultiXactId: 1; next MultiXactOffset: 0
      LOG:  database system was not properly shut down; automatic recovery in progress
      LOG:  record with zero length at 2/5900012C
      LOG:  redo is not required
      LOG:  database system is ready
      LOG:  transaction ID wrap limit is 1075055134, limited by database "MagicHome"
      
    21. 도저히 해결 안됨;;
  4. 결과
    1. VACUUM ANALYZE 도중 절대 크래쉬 나면 안된다;;;;
이 글에 대한 댓글이 총 2건 있습니다.

저도 비슷한 경우가...ㅡ.ㅡ;

pgsql의 버그일까요?

박성철(gyumee)님이 2006-04-27 10:54에 작성한 댓글입니다.

다행히 신규로 들이던 서버라서 다시 복원하고 몇시간 삽질해서 정상상태 됐습니다 ㅠ_ㅠ;

문제있던 클러스터 그대로 놔뒀으니 언제 맘먹고 한번 디벼봐야겠네요;

신기배(소타)님이 2006-04-27 15:23에 작성한 댓글입니다.
[Top]
No.
제목
작성자
작성일
조회
6646이 sql이 의미하는 바를 좀 알려주세요. [1]
YS
2006-04-26
2817
6645컬럼 위치 변화에 관해 질문여..? [3]
조진우
2006-04-26
2613
6641특정필드에 문자열을 더하여 저장할 수 없을까요? [3]
신인식
2006-04-25
2813
6640pgsql 개작살 ㅠ_ㅠ; [2]
신기배
2006-04-25
6155
6639'mm-dd'와 'yyyy-mm-dd'의 비교는요? [2]
조우현
2006-04-25
2758
6638insert 인데 update로 가능하게?? [4]
MIN
2006-04-24
3006
6636UTF-8, eucKR 인코딩 문제.. [2]
김명범
2006-04-23
5450
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.022초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다