> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-fix-nav-issues.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Managed Postgres 마이그레이션 FAQ

> ClickHouse Managed Postgres로 데이터를 마이그레이션할 때 자주 묻는 질문입니다.

export const PrivatePreviewBadge = () => {
  return <div className="privatePreviewBadge">
            <div className="privatePreviewIcon">
            <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
                <path d="M5.33301 6.66667V4.66667V4.66667C5.33301 3.194 6.52701 2 7.99967 2V2C9.47234 2 10.6663 3.194 10.6663 4.66667V4.66667V6.66667" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" />
                <path d="M8.00033 9.33337V11.3334" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" />
                <path fillRule="evenodd" clipRule="evenodd" d="M11.333 14H4.66634C3.92967 14 3.33301 13.4033 3.33301 12.6666V7.99996C3.33301 7.26329 3.92967 6.66663 4.66634 6.66663H11.333C12.0697 6.66663 12.6663 7.26329 12.6663 7.99996V12.6666C12.6663 13.4033 12.0697 14 11.333 14Z" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" />
            </svg>
        </div>
            {'Private preview in ClickHouse Cloud'}
        </div>;
};

`TOAST` 컬럼, replication slot, publication, 스키마 변경, 데이터 타입 매핑 등 Postgres 복제의 작동 방식과 관련된 많은 질문은 [ClickPipes for Postgres FAQ](/ko/integrations/clickpipes/postgres/faq)에서 다룹니다. 해당 정보는 Managed Postgres 마이그레이션에도 적용됩니다.

<div id="invalid-enum-value">
  ### 복제 중 "enum의 입력 값이 잘못되었습니다" 오류가 표시됩니다
</div>

이 오류는 원본 Postgres에 있는 enum 값이 대상 Managed Postgres에는 없을 때 발생합니다. 논리적 복제는 `ALTER TYPE ... ADD VALUE` 명령을 자동으로 전파하지 않으므로, 초기 스키마 설정 후 원본에 추가된 새 enum 값 때문에 대상에서 삽입이 실패합니다.

이 문제를 해결하려면 대상 Postgres의 enum 유형에 누락된 값을 추가하십시오:

```sql theme={null}
ALTER TYPE your_enum_type ADD VALUE 'new_value';
```

`your_enum_type`을 enum 유형 이름으로, `'new_value'`를 오류 메시지에 표시된 누락된 값으로 바꾸십시오.

<div id="unique-constraint-violation">
  ### 복제 중 고유 제약 조건 위반 오류가 발생하는 경우
</div>

논리적 복제 중에는 복제 순서로 인해 대상에 이미 존재하는 고유 제약 조건과 충돌이 발생하여 고유 제약 조건 위반이 생길 수 있습니다. 이는 후속 업데이트에서 해결되기 전에 일시적으로 고유성 위반이 발생하는 작업을 재생하는 CDC 워크로드에서 나타날 수 있습니다.

복제를 다시 진행할 수 있도록 대상 Postgres에서 고유 제약 조건을 삭제하세요:

```sql theme={null}
ALTER TABLE your_table DROP CONSTRAINT your_constraint_name;
```

다음을 실행하여 제약 조건 이름을 확인할 수 있습니다:

```sql theme={null}
SELECT conname, conrelid::regclass
FROM pg_constraint
WHERE contype = 'u';
```

복제가 완료되어 소스가 더 이상 활성 상태가 아니면 컷오버 시점에 제약 조건을 다시 추가하십시오:

```sql theme={null}
ALTER TABLE your_table ADD CONSTRAINT your_constraint_name UNIQUE (column1, column2);
```
