Обсуждение: Changing Data Type on Production Database - Impact

Поиск
Список
Период
Сортировка

Changing Data Type on Production Database - Impact

От
Raj kumar
Дата:

Hi,


I have a UseCase to modify the Data Types of some columns in a Table as specified below. 

How much time does it take approximately for modifying a 30GB table? Should I perform this only during Downtime or can I do it on a Production Database?


Data Type Changes,

test=> alter table speed1 alter column expireat type date USING expireat::date;

ALTER TABLE

 

test=> alter table speed1 alter column condition type jsonb[] USING condition::jsonb[];

ALTER TABLE

 

test=> alter table speed1 alter column last_login type timestamp with time zone USING last_login::timestamp with time zone;

ALTER TABLE


test=> alter table speed1 alter column remote_addr type inet USING remote_addr::inet;

ALTER TABLE


Thanks,

Raj Kumar Narendiran.