Increasing size of array items without locking

Поиск
Список
Период
Сортировка
От Rowan Seymour
Тема Increasing size of array items without locking
Дата
Msg-id CAEhK25rQj8mn4uGVMygfuLaFZAhqWj15aYnbPenatAHOczsOQw@mail.gmail.com
обсуждение исходный текст
Список pgsql-general

Hi. I'm trying to increase the size of items in an array column on a large production database but it's locking the table. Is it correct than when you make a field larger, it shouldn't lock because it doesn't have to check the constraint on every row? For example expanding a VARCHAR column from 255 chars to 2048 chars.

Is the problem here that it is an array field?

ALTER TABLE "msgs_msg" ALTER COLUMN "attachments" TYPE varchar(2048)[] USING "attachments"::varchar(2048)[];

Thanks

-Rowan

--
Rowan Seymour | +593 979099233 | @rowanseymour

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

Предыдущее
От: Pavan Teja
Дата:
Сообщение: Re: FATAL: failed to create a backend connection
Следующее
От: Renzo Bertuzzi
Дата:
Сообщение: Postgres Planner "Inconsistency"?