3 ms·
According to the Postgres documentation, the behavior the poster a few levels up defined is possible in Postgres with no downtime. > When a column is added wit
by sausagefeet 15y ago
According to the Postgres documentation, the behavior the poster a few levels up defined is possible in Postgres with no downtime.
> When a column is added with ADD COLUMN, all existing rows in the table are initialized with the column's default value (NULL if no DEFAULT clause is specified).
> Adding a column with a non-null default or changing the type of an existing column will require the entire table to be rewritten. This might take a significant amount of time for a large table; and it will temporarily require double the disk space.
http://www.postgresql.org/docs/8.3/static/sql-altertable.html http://www.postgresql.org/docs/8.3/static/sql-altertable.htm...