Skip to content
RED SAGSkills
hard20 pts · first answer countspostgresqlschema-changes

ADD COLUMN that rewrote the table

On PostgreSQL 16, ALTER TABLE t ADD COLUMN a int DEFAULT 0 finished instantly, but ADD COLUMN b uuid DEFAULT gen_random_uuid() locked the table for an hour. Why?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions