Search Postgresql Archives

Re: Updating pg_attribute to change field's data type from integer to bigint on very large table

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

 



On 2012-04-13, Jeff Adams <jeff.adams@xxxxxxxx> wrote:
> --e89a8ff1c1e8d37deb04bd922a84
> Content-Type: text/plain; charset=ISO-8859-1
>
> Thanks for the ideas Steve. I am actually working with a partitioned table
> and the field I am modifying is the id field (I have reached the cap on the
> integer data type and need to modify it to bigint - very poor planning on
> my part!), but no related tables exist. The id field in the partitioned
> tables is inherited, so I figured I needed to alter the column in the
> parent table. Does this information point towards an optimal solution?
> Thanks again...

you can drop the inheritance and alter the tables one at a time, I did
this on a partitioned table with only millions of rows when I saw
what direction it was going in.

As my data was partitioned by time the system had to run without some
of the older data for a while while my script altered and re-inherited 
each partition.

-- 
⚂⚃ 100% natural


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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