Search Postgresql Archives

alter column type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a database in which one table references the primary key of another.  The type of the primary key was initially int, but I changed it to bigint.  However, I forgot to update the type of a column that references it.  So, I've initiated "ALTER TABLE foo ALTER COLUMN bar TYPE bigint", where foo/bar is the table/column referencing the primary key that is now of type bigint. 

However, with 2^31 rows, it is taking a "long" time to write the rows (it's been 12 hours).  Is there a more efficient way to do this?  Even if/when this one finishes, there are other column types that I have to update.  This update effectively locked me out of all access to the data anyway, so I don't foresee any concern of writes that might affect integrity.

Cheers,
Casey

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux