- PHASE 01 Automated Guard
AST Lock Analysis
Parses raw SQL migrations using libpg_query against a live catalog snapshot of pg_class, pg_index, and pg_stat_user_tables.
Guarantee: Zero guesswork on lock modes or volatile default rewrites. - PHASE 02 Automated Guard
Shadow Provisioning
Materializes an empty _driftless_shadow table with target column types, storage parameters, and deferred secondary indexes.
Guarantee: Primary table remains writable with zero exclusive locks. - PHASE 03 Automated Guard
Adaptive Chunk Backfill
Copies primary-key ranges while sampling replica lag, WAL generation rate, and autovacuum I/O budgets every 250ms.
Guarantee: Automatically pauses before replica lag breaches 500ms. - PHASE 04 Automated Guard
Atomic Dual-Rename Cutover
Drains the logical replication slot, acquires ACCESS EXCLUSIVE with a strict 150ms lock_timeout, and swaps table OIDs cleanly.
Guarantee: Aborts and backs off safely if a long-running query holds a lock.