I have a pretty big table (around 1 billion rows), and I need to update the id type from SERIAL
to BIGSERIAL
; guess why?:).
Basically this could be done with this command:
execute "ALTER TABLE my_table ALTER COLUMN id SET DATA TYPE bigint"
Nevertheless that would lock my table forever and put my web service down.
Is there a quite simple way of doing this operation concurrently (whatever the time it will take)?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…