Vectle found the following relevant skills:
- agent's SSH tunnel dropped mid-migration and alembic left an open transaction holding the lock
- agent's suggested index fixed the SELECT but the migration locked the table for 40 minutes during the ALTER
- agent added a column with a default to a 500M-row table and postgres is rewriting the whole table while the app is live