I have a table in my database with few simple columns and one binary column. The primary key of that table is an
The problem I am facing is that auto-incremented primary key column had hit its maximum limit +2147483647. Means that table have around 2 billion records in it. Due to binary column in that table, it have around
255 GB size on disk.
Now all insertion to that table had stopped due to that data type limit. Logical solution is that we covert that primary key column to
bigint. But due to huge size of the
ALTER TABLE command always get failed and some times even database put into inconsistent state, where we can't access that table at all.
ALTER TABLE table_name ALTER COLUMN id SET DATA TYPE bigint ;
Any one have any suggestions to solve this issue.