[PostgreSQL] ERROR: WKB structure does not match expected size! 해결

2026. 2. 25. 15:02·트러블슈팅

문제 발생 상황

로컬 DB에 있는 데이터를 원격 DB로 옮기는 과정에서 다음 오류가 발생했다.

[2026-02-25 14:22:49] [XX000]
[2026-02-25 14:22:49]  Batch entry 3 INSERT INTO public.legal_address (id, code, created_at, updated_at, address_initials, eupmyeondong, li, sido, sigungu, center_point, full_address, polygon, latitude, longitude, region_address_level, geohash) VALUES (5908, '4180036030', null, null, '경연신신', '신서면', '신현리', '경기도', '연천군', '0101000020E6100000DBE1BBFD42C25F404F8F0A71181D4340', '경기도 연천군 신서면 신현리',

…

, 38.22730839744201, 127.03533881519199, 'DL', 'wyf36z') was aborted: ERROR: WKB structure does not match expected size!
[2026-02-25 14:22:49]    Position: 358  Call getNextException to see other errors in the batch.
[2026-02-25 14:22:49] [XX000] ERROR: WKB structure does not match expected size!
[2026-02-25 14:22:49] Position: 358

 

1. Datagrip을 이용해 원본 테이블에서 insert문을 추출 -> .sql 파일 생성

2. 클린한 새로운 테이블에서 run  

3. 몇몇 데이터 삽입 시 언급한 오류 발생

 

해결

- .sql파일 실행 시 문제가 있었던 데이터를 하나씩 수동 copy 후 insert하는 경우 성공적으로 작업이 완료되는 것을 발견했다.

따라서 추출 과정에 문제가 발생했음을 짐작하고, pg_dump를 이용해 데이터 추출 작업을 진행했다.

- pg_dump를 이용해 export한 dump file을 원격 DB에서 psql로 restore했다.

 

 

'트러블슈팅' 카테고리의 다른 글

[Hibernate 6.6] @BeforeEach에서 객체 저장 시 StaleObjectStateException 발생 해결  (0) 2025.09.15
REQUIRES_NEW로 인한 DB 커넥션 리소스 고갈  (0) 2025.01.23
testImplementation 'org.testcontainers:rabbitmq:1.20.4' 2 vulnerabilities found in dependency  (0) 2025.01.01
[DockerCompose]Error: "failed to create task for container: Unavailable: error reading from server  (0) 2024.10.27
[Redis Error] Unable to send PING command over channel  (0) 2024.10.22
'트러블슈팅' 카테고리의 다른 글
  • [Hibernate 6.6] @BeforeEach에서 객체 저장 시 StaleObjectStateException 발생 해결
  • REQUIRES_NEW로 인한 DB 커넥션 리소스 고갈
  • testImplementation 'org.testcontainers:rabbitmq:1.20.4' 2 vulnerabilities found in dependency
  • [DockerCompose]Error: "failed to create task for container: Unavailable: error reading from server
용쓰개
용쓰개
  • 용쓰개
    용쓰게
    용쓰개
  • 전체
    오늘
    어제
    • 분류 전체보기 (36)
      • Spring (13)
        • 스프링 Data JPA (0)
        • 스프링 시큐리티 (1)
        • QueryDSL (1)
        • webflux (1)
      • 후기 (1)
        • 일상 (0)
        • 책 (0)
      • 운영체제 (1)
      • 트러블슈팅 (11)
      • PL (7)
        • JAVA (7)
      • Infra (1)
      • Network (0)
      • DB (2)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

  • 공지사항

  • 인기 글

  • 태그

  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.0
용쓰개
[PostgreSQL] ERROR: WKB structure does not match expected size! 해결
상단으로

티스토리툴바