ALTER TABLE ... ADD COLUMN requires an exclusive lock: all other transactions that are referencing the table must commit before the ALTER can proceed.
Also, in v7 the ALTER must rewrite all of the rows. If the table is large, it can take a significant amount of time. The exclusive lock is held the entire time so while the ALTER is in progress, all other connections that attempt to access the table will block.
answered 25 Mar '13, 07:12