Is there a method to do an ALTER COLUMN in postgres 12 on an huge table without waiting a lifetime?
I try to convert a field from bigint to smallint :
ALTER TABLE huge ALTER COLUMN result_code TYPE SMALLINT;
It takes 8 hours, is there a smarter method? The table has sequences, keys and foreign keys
Best Answer
Laurenz Albe answered this question on a similar post
this is the answer:
here is the question