Increasing size of array items without locking - Mailing list pgsql-general

From Rowan Seymour
Subject Increasing size of array items without locking
Date
Msg-id CAEhK25rQj8mn4uGVMygfuLaFZAhqWj15aYnbPenatAHOczsOQw@mail.gmail.com
Whole thread Raw
List 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 by date:

Previous
From: Pavan Teja
Date:
Subject: Re: FATAL: failed to create a backend connection
Next
From: Renzo Bertuzzi
Date:
Subject: Postgres Planner "Inconsistency"?