Re: feature request - adding columns with default value

Поиск
Список
Период
Сортировка
От Diogo de Oliveira Biazus
Тема Re: feature request - adding columns with default value
Дата
Msg-id 3E8D7D3A.50008@ikono.com.br
обсуждение исходный текст
Ответ на feature request - adding columns with default value  ("Henrik Steffen" <steffen@city-map.de>)
Ответы Re: feature request - adding columns with default value  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Re: feature request - adding columns with default value  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Henrik Steffen wrote:

>hello,
>
>when doing an "alter table blub add column blah int2"
>and then issuing an "alter table blub alter column blah set default 0"
>I will always have to manually "update blub set blah=0" to initialize
>all existing records.... this is quite annoying while performing this
>update on a running database with 100 simultaneous clients accessing
>the database and about 443482 rows in the table.
>
>it takes about 10 minutes to perform this update, and for about 6 minutes
>all other updates to the table are in status "waiting", this leads to
>a very high load and all max_connection setting is reached soon
>(on a Dual-Xeon 2.4 GHz machine with 2 GB RAM)
>
>i would suggest to change the "alter table add column" function to
>adding a default value while adding the column if this is possible
>and if this minimizes "down-time".
>
>thank you
>
>
Maybe I'm wrong, but this feature was supported in 7.1,
and it was removed in 7.2.
If what I'm saying is true, I would like to know why was this feature
removed?

--
Diogo de Oliveira Biazus
diogo@ikono.com.br
Ikono Sistemas e Automação
http://www.ikono.com.br


В списке pgsql-general по дате отправления:

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: feature request - adding columns with default value
Следующее
От: Jason Hihn
Дата:
Сообщение: Re: Single Byte values