Re: Cases where alter table set type varchar(longer length) still needs table rewrite

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Cases where alter table set type varchar(longer length) still needs table rewrite
Дата
Msg-id 573.1581949272@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Cases where alter table set type varchar(longer length) still needstable rewrite  (Jeremy Finzel <finzelj@gmail.com>)
Ответы Re: Cases where alter table set type varchar(longer length) stillneeds table rewrite
Список pgsql-general
Jeremy Finzel <finzelj@gmail.com> writes:
> I have a table foo with 100 million rows, and a column:
>    - id character varying(20)
> The following command is the one that we expect to execute very quickly (we
> are not seeing any locking), but it is instead taking a very long time:
>    - ALTER TABLE foo ALTER COLUMN id TYPE varchar(100);

Hm, the code is supposed to avoid a table rewrite, but I wonder if
there's something else that's not being avoided, such as an index
rebuild or foreign-key verification.  Could we see the whole table
definition, eg from psql \d+ ?

            regards, tom lane



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

Предыдущее
От: Jeremy Finzel
Дата:
Сообщение: Cases where alter table set type varchar(longer length) still needstable rewrite
Следующее
От: Jeremy Finzel
Дата:
Сообщение: Re: Cases where alter table set type varchar(longer length) stillneeds table rewrite