Support for analyze <query> — running a query through Postgres’s
EXPLAIN (ANALYZE, FORMAT JSON) and reporting a query plan grouped by the
shape of the original query (its root select, each nested link, etc.)
instead of raw SQL relation names.
Schema diff engine: given a target SchemaDescriptor and the live database
state (introspected via pg_catalog), produce ordered DDL SQL statements
to bring the database in sync with the target.
PostgreSQL pg_catalog introspection for schema diffing — a direct Rust
port of pylon.schema._introspect.introspect_db_state. Queries the live
database and returns a DbState describing the current user-managed
schema structure. System schemas (_pylon, pg_*, information_schema)
are excluded automatically; the public Postgres schema is treated as
the default Pylon module.
Migration execution: advisory locking, tracking tables, resumable
per-step progress, and dev-mode savepoint retry. A direct Rust port of
pylon.cli.commands.migrations’s _apply_one (plus the tracking-table
helpers _ensure_tracking_tables/_read_tracking/_applied_tip/
_record_applied it and _apply’s outer loop share). The outer
apply loop itself (chain resolution, --to targeting, the squash-
backfill special case, click.echo progress output) stays in Python —
this module is the part that’s actually “migration execution.”