당신의 Postgres 마이그레이션, 정말 안전할까?
Is your Postgres migration safe or not safe?
safenotsafe.dev가 공개한 도구 'safe-not-safe'는 migration.sql 파일을 분석해 Postgres 마이그레이션의 위험 요소를 판별한다. libpg_query 17(wasm) 기반으로 SQL을 파싱하고, 상수 기본값 추가, 동시 인덱스 생성, 제약 조건 검증 등 각 구문이 기존 행을 다시 쓰거나 쓰기를 차단하는지 검사한다. 일반적인 잠금, 재작성, 롤아웃 함정을 피했는지 한눈에 보여준다.
SAFE— No blocking pattern found. The checked statements avoid the common lock, rewrite, and rollout traps in the launch rule set.