Repository navigation
fix: 파티션 상속 인덱스를 원본 이름 그대로 복원 - #49
Merged
Merged
Conversation
파티션 부모 인덱스를 재귀로 만들면 하위 파티션 인덱스가 자동 이름으로 만들어져, 원본에서 이름을 바꾼 상속 인덱스(`inherited_idx`)가 `c1_id_idx1` 처럼 다른 이름이 됐다. 파티션 트리의 인덱스를 모두 파티션 생성 뒤로 모으고, 인덱스 트리(pg_inherits)마다 깊은 단계부터 원본 이름으로 만든다. 상위 인덱스는 `ON ONLY` 없이(재귀로) 만들어 PostgreSQL 이 정의가 같은 하위 인덱스를 새로 만들지 않고 붙이게(attach) 한다 — 이름이 보존되고, 외부 테이블 파티션은 건너뛰어 부모 인덱스도 원본처럼 유효하다 (pg_dump 식 ON ONLY + ATTACH 는 외부 파티션이 있으면 무효로 남음). 뿌리가 얕은 트리부터 만들어, 하위 파티션 자체 인덱스는 정의가 같은 위 단계 인덱스에 잘못 붙지 않는다. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
3차 리뷰 #11 마무리 — #47 에서 이름 충돌 실패는 고쳤지만, 원본에서 이름을 바꾼 상속 인덱스는 자동 이름(
c1_id_idx1)으로 바뀌었다.pg_partition_tree+pg_inherits)ON ONLY없이 재귀 생성 → PostgreSQL 이 정의가 같은 하위 인덱스를 붙임(attach) → 이름 보존ON ONLY+ATTACH PARTITION은 외부 파티션이 있으면indisvalid = false로 남음)Test plan
cargo fmt --check,cargo clippy --all-targets --all-features -- -D warnings,cargo test --all-featuresindisvalid모두 원본과 동일 / 기존 파티션 픽스처(hsrc) 왕복 동일🤖 Generated with Claude Code