I am using Postgres 8.4
I need to execute an ALTER statement on a running database with ~4M data on the relevant table. My sql is like:
ALTER TABLE some_table ALTER a_row bigint;
Now, relevant row type is int
But what i wonder is data consistency, Nearly 3-4 records are written to that table and some more are being read per second.
What i need to do for avoiding data consistency and such other problems.
When you execute and
ALTER TABLEsql, table will be locked and you shouldn’t have any problems except some possible performance issues inINSERTsqls in your case. But if you are going to do this once, there is no reason to hesitate.