Twice recently, on two different PostgreSQL 9.5 databases hosted at Amazon 
RDS, we've been unable to apply Alembic migrations. We have successfully 
run dozens of Alembic migrations in the past against one of these databases 
but those were quieter times for us. As far as I can tell, it's because our 
databases are too busy now and the load never lets up.

The Alembic process just hangs and other database queries start backing up. 
The only recourse is to kill the Alembic process. In at least one case, 
we've also had to track down the ALTER statement in pg_stat_activity and 
terminate the associated pid. Once I had to reboot the database at RDS 
before it recovered.

The SQL generated for one of these migrations is:
  ALTER TABLE redacted ADD COLUMN report_format VARCHAR(4)
which is as simple as it gets.

In both cases, we're trying to add columns to tables that are hardly ever 
modified—and not at all while the Alembic migrations were executing. 
However, many of our most frequent SELECTs JOIN to these tables, so they're 
constantly being read from.

Aside, from making a planned outage, do we have any good options?

Thanks!
/George Reilly

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to