Reputation: 18727
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.
Upvotes: 1
Views: 248
Reputation: 5823
When you execute and ALTER TABLE
sql, table will be locked and you shouldn't have any problems except some possible performance issues in INSERT
sqls in your case. But if you are going to do this once, there is no reason to hesitate.
Upvotes: 1