How to run short ALTER TABLE without long locking concurrent queries

Recently I’ve seen case like: application had to add column to table. application ran ALTER TABLE ADD COLUMN (without default!) everything stopped for many MINUTES Why? How to avoid the problem? First, let’s see what’s happening when I try to alter table add column: =# alter table test add column whatever int4; ALTER TABLE Time: … Continue reading How to run short ALTER TABLE without long locking concurrent queries