Which Django operation is safest to run on a very large table?
- A Adding a nullable column with no default
- B Adding a NOT NULL column with a default on an old database version
- C Creating an index without CONCURRENTLY
- D Altering a column type
Answer
Adding a nullable column with no default
On PostgreSQL a nullable column with no default is a metadata-only change. The other operations can lock the table for an extended period.





